Variable: electric-quote-chars
electric-quote-chars is a customizable variable defined in
electric.el.gz.
Value
(8216 8217 8220 8221)
Documentation
Curved quote characters for electric-quote-mode(var)/electric-quote-mode(fun).
This list's members correspond to left single quote, right single quote, left double quote, and right double quote, respectively.
When electric-quote-mode(var)/electric-quote-mode(fun) is enabled, as you type it replaces ` with
the first element of this list, ' with the second element, ``
with the third, and '' with the fourth. This occurs only in
comments, strings, and text paragraphs, and these are selectively
controlled with electric-quote-comment, electric-quote-string, and
electric-quote-paragraph.
Commonly used pairs are predefined, or you can define your own completely custom style.
This variable was added, or its default value changed, in Emacs 26.1.
Probably introduced at or before Emacs version 26.1.
Source Code
;; Defined in /usr/src/emacs/lisp/electric.el.gz
(defcustom electric-quote-chars '(?‘ ?’ ?“ ?”)
"Curved quote characters for `electric-quote-mode'.
This list's members correspond to left single quote, right single
quote, left double quote, and right double quote, respectively.
When `electric-quote-mode' is enabled, as you type it replaces \\=` with
the first element of this list, \\=' with the second element, \\=`\\=`
with the third, and \\='\\=' with the fourth. This occurs only in
comments, strings, and text paragraphs, and these are selectively
controlled with `electric-quote-comment', `electric-quote-string', and
`electric-quote-paragraph'.
Commonly used pairs are predefined, or you can define your own
completely custom style."
:version "26.1"
:type '(choice
(const :format "%t: %v\n" :tag "Default"
:value-create electric--print-list-of-chars
(?‘ ?’ ?“ ?”))
(list :tag "Predefined pairs"
(electric-quote-chars-pairs :tag "Single quotes")
(electric-quote-chars-pairs :tag "Double quotes"))
(list :tag "Custom"
(character ?‘) (character ?’)
(character ?“) (character ?”)))
:safe (lambda (x)
(pcase x
(`(,(pred characterp) ,(pred characterp)
,(pred characterp) ,(pred characterp))
t)))
:group 'electricity)