mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
* lisp/emacs-lisp/lisp.el (insert-pair-alist): Turn defvar into defcustom.
Revert to old default value. (Bug#35480)
This commit is contained in:
parent
c31823a51b
commit
6fa99f06b9
1 changed files with 12 additions and 9 deletions
|
|
@ -645,14 +645,8 @@ Interactively, the behavior depends on `narrow-to-defun-include-comments'."
|
|||
(re-search-backward "^\n" (- (point) 1) t)
|
||||
(narrow-to-region beg end))))
|
||||
|
||||
(defvar insert-pair-alist
|
||||
(append '((?\< ?\>) (?\" ?\") (?\' ?\') (?\` ?\'))
|
||||
(let (alist)
|
||||
(map-char-table
|
||||
(lambda (open close)
|
||||
(when (< open close) (push (list open close) alist)))
|
||||
(unicode-property-table-internal 'paired-bracket))
|
||||
(nreverse alist)))
|
||||
(defcustom insert-pair-alist
|
||||
'((?\( ?\)) (?\[ ?\]) (?\{ ?\}) (?\< ?\>) (?\" ?\") (?\' ?\') (?\` ?\'))
|
||||
"Alist of paired characters inserted by `insert-pair'.
|
||||
Each element looks like (OPEN-CHAR CLOSE-CHAR) or (COMMAND-CHAR
|
||||
OPEN-CHAR CLOSE-CHAR). The characters OPEN-CHAR and CLOSE-CHAR
|
||||
|
|
@ -661,7 +655,16 @@ or without modifiers, are inserted by `insert-pair'.
|
|||
|
||||
If COMMAND-CHAR is specified, it is a character that triggers the
|
||||
insertion of the open/close pair, and COMMAND-CHAR itself isn't
|
||||
inserted.")
|
||||
inserted."
|
||||
:type '(repeat (choice (list :tag "Pair"
|
||||
(character :tag "Open")
|
||||
(character :tag "Close"))
|
||||
(list :tag "Triple"
|
||||
(character :tag "Command")
|
||||
(character :tag "Open")
|
||||
(character :tag "Close"))))
|
||||
:group 'lisp
|
||||
:version "27.1")
|
||||
|
||||
(defun insert-pair (&optional arg open close)
|
||||
"Enclose following ARG sexps in a pair of OPEN and CLOSE characters.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue