Function: csv-end-of-field
csv-end-of-field is a natively compiled function defined in
csv-mode.el.
Signature
(csv-end-of-field)
Documentation
Skip forward over one field.
Source Code
;; Defined in /nix/store/3gmjnyw9n226b7k7jamikx980vf8267p-emacs-packages-deps/share/emacs/site-lisp/elpa/csv-mode-1.27/csv-mode.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Moving by field
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun csv-end-of-field ()
"Skip forward over one field."
(skip-chars-forward " ")
;; If the first character is a double quote, then we have a quoted
;; value.
(when (eq (char-syntax (following-char)) ?\")
(forward-char)
(let ((ended nil))
(while (and (not ended) (not (eolp)))
(cond ((not (eq (char-syntax (following-char)) ?\"))
(forward-char 1))
;; According to RFC-4180 (sec 2.7), quotes inside quoted strings
;; are quoted by doubling the quote char: a,"b""c,",d
;; FIXME: Maybe we should handle this via syntax-propertize?
((let ((c (char-after (1+ (point)))))
(and c (eq (char-syntax c) ?\")))
(forward-char 2))
(t
(setq ended t))))))
(skip-chars-forward csv--skip-chars))