diff options
| author | Wilson Snyder <wsnyder@wsnyder.org> | 2019-05-06 18:35:59 -0400 |
|---|---|---|
| committer | Wilson Snyder <wsnyder@wsnyder.org> | 2019-05-06 18:35:59 -0400 |
| commit | 921d279e15256a07168033b0c50f1fc82e22ef7f (patch) | |
| tree | e048888bb4983009668a594f6ba83e3baa1b6ea3 /lisp/emacs-lisp/lisp.el | |
| parent | 01963fbbe10d290ba037cd523d21ebbcd2536b40 (diff) | |
| parent | 6fa99f06b92b593082d7181ba59ab7eebda45f81 (diff) | |
| download | emacs-921d279e15256a07168033b0c50f1fc82e22ef7f.tar.gz | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index f73dbb269d8..38df920f17a 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -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. |
