Variable: csv-separators

csv-separators is a customizable variable defined in csv-mode.el.

Value

("," "	")

Documentation

Field separators: a list of *single-character* strings.

For example: (","), the default, or ("," ";" ":"). Neighbouring fields may be separated by any one of these characters. The first is used when inserting a field separator into the buffer. All must be different from the field quote characters, csv-field-quotes.

Changing this variable with setq won't affect the current Emacs session. Use customize-set-variable instead if that is required.

Source Code

;; Defined in /nix/store/3gmjnyw9n226b7k7jamikx980vf8267p-emacs-packages-deps/share/emacs/site-lisp/elpa/csv-mode-1.27/csv-mode.el
(defcustom csv-separators '("," "\t")
  "Field separators: a list of *single-character* strings.
For example: (\",\"), the default, or (\",\" \";\" \":\").
Neighbouring fields may be separated by any one of these characters.
The first is used when inserting a field separator into the buffer.
All must be different from the field quote characters, `csv-field-quotes'.

Changing this variable with `setq' won't affect the current Emacs
session.  Use `customize-set-variable' instead if that is required."
  ;; Suggested by Eckhard Neber <neber@mwt.e-technik.uni-ulm.de>
  :type '(repeat string)
  ;; FIXME: Character would be better, but in Emacs 21.3 does not display
  ;; correctly in a customization buffer.
  :set (lambda (variable value)
	 (mapc (lambda (x)
		 (if (/= (length x) 1)
		     (error "Non-single-char string %S" x))
                 (if (and (boundp 'csv-field-quotes)
                          (member x csv-field-quotes))
                     (error "%S is already a quote" x)))
	       value)
	 (custom-set-default variable value)
         (setq csv-separator-chars (mapcar #'string-to-char value))
         (setq csv--skip-chars
               (apply #'concat "^\n"
                      (mapcar (lambda (s) (concat "\\" s)) value)))
         (setq csv-separator-regexp (regexp-opt value))
         (setq csv-font-lock-keywords
               ;; NB: csv-separator-face variable evaluates to itself.
               `((,csv-separator-regexp (0 'csv-separator-face))))))