* lisp/emacs-lisp/lisp.el (insert-pair-alist): Precompute default value.
Use unicode-property-table-internal with 'paired-bracket to append pairs of open/close characters to the default value (bug#35480).
This commit is contained in:
parent
df9b56ecff
commit
c64cb02cca
1 changed files with 7 additions and 1 deletions
|
@ -646,7 +646,13 @@ Interactively, the behavior depends on `narrow-to-defun-include-comments'."
|
|||
(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)))
|
||||
"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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue