Function: csv-set-separator
csv-set-separator is an interactive and natively compiled function
defined in csv-mode.el.
Signature
(csv-set-separator SEP)
Documentation
Set the CSV separator in the current buffer to SEP.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/3gmjnyw9n226b7k7jamikx980vf8267p-emacs-packages-deps/share/emacs/site-lisp/elpa/csv-mode-1.27/csv-mode.el
(defun csv-set-separator (sep)
"Set the CSV separator in the current buffer to SEP."
(interactive (list (read-char-from-minibuffer
"Separator: " nil 'csv--set-separator-history)))
(when (and (boundp 'csv-field-quotes)
(member (string sep) csv-field-quotes))
(error "%c is already a quote" sep))
(setq-local csv-separators (list (string sep)))
(setq-local csv-separator-chars (list sep))
(setq-local csv--skip-chars (format "^\n\\%c" sep))
(setq-local csv-separator-regexp (regexp-quote (string sep)))
(setq-local csv-font-lock-keywords
`((,csv-separator-regexp (0 'csv-separator-face))))
(font-lock-refresh-defaults))