Variable: electric-pair-pairs
electric-pair-pairs is a customizable variable defined in
elec-pair.el.gz.
Value
((34 . 34) (8216 . 8217) (8220 . 8221))
Documentation
Alist of pairs that should be used regardless of major mode.
Pairs of delimiters in this list are a fallback in case they have
no syntax relevant to electric-pair-mode(var)/electric-pair-mode(fun) in the mode's syntax
table.
Each list element should be in one of these forms:
(CHAR . CHAR)
Where CHAR is character to be used as pair.
(STRING STRING SPC)
Where STRING is a string to be used as pair and SPC a non-nil value
which specifies to insert an extra space after first STRING.
(STRING . STRING)
This is similar to (STRING STRING SPC) form, except that SPC (space) is
ignored and will not be inserted.
In both string pairs forms, the first string pair must be a regular expression.
Unlike character pairs, string pairs do not support
inserting pairs in regions and cannot be deleted with
electric-pair-delete-pair, thus string pairs should be used only for
multi-character pairs.
See also the variable electric-pair-text-pairs.
This variable was added, or its default value changed, in Emacs 24.1.
Probably introduced at or before Emacs version 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/elec-pair.el.gz
;;; Electric pairing.
(defcustom electric-pair-pairs
`((?\" . ?\")
(,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars))
(,(nth 2 electric-quote-chars) . ,(nth 3 electric-quote-chars)))
"Alist of pairs that should be used regardless of major mode.
Pairs of delimiters in this list are a fallback in case they have
no syntax relevant to `electric-pair-mode' in the mode's syntax
table.
Each list element should be in one of these forms:
(CHAR . CHAR)
Where CHAR is character to be used as pair.
(STRING STRING SPC)
Where STRING is a string to be used as pair and SPC a non-nil value
which specifies to insert an extra space after first STRING.
(STRING . STRING)
This is similar to (STRING STRING SPC) form, except that SPC (space) is
ignored and will not be inserted.
In both string pairs forms, the first string pair must be a regular
expression.
Unlike character pairs, string pairs do not support
inserting pairs in regions and cannot be deleted with
`electric-pair-delete-pair', thus string pairs should be used only for
multi-character pairs.
See also the variable `electric-pair-text-pairs'."
:version "24.1"
:group 'electricity
:type '(repeat
(choice (cons :tag "Characters" character character)
(cons :tag "Strings" string string)
(list :tag "Strings, plus insert SPC after first string"
string string boolean))))