diff options
| author | Juri Linkov | 2019-05-06 22:32:26 +0300 |
|---|---|---|
| committer | Juri Linkov | 2019-05-06 22:32:26 +0300 |
| commit | 6fa99f06b92b593082d7181ba59ab7eebda45f81 (patch) | |
| tree | e403856f4fe129183cc16942bda278b1a59a67b0 | |
| parent | c31823a51bba1e4f0c87af1a08ce856cc600f5c8 (diff) | |
| download | emacs-6fa99f06b92b593082d7181ba59ab7eebda45f81.tar.gz emacs-6fa99f06b92b593082d7181ba59ab7eebda45f81.zip | |
* lisp/emacs-lisp/lisp.el (insert-pair-alist): Turn defvar into defcustom.
Revert to old default value. (Bug#35480)
| -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'." | |||
| 645 | (re-search-backward "^\n" (- (point) 1) t) | 645 | (re-search-backward "^\n" (- (point) 1) t) |
| 646 | (narrow-to-region beg end)))) | 646 | (narrow-to-region beg end)))) |
| 647 | 647 | ||
| 648 | (defvar insert-pair-alist | 648 | (defcustom insert-pair-alist |
| 649 | (append '((?\< ?\>) (?\" ?\") (?\' ?\') (?\` ?\')) | 649 | '((?\( ?\)) (?\[ ?\]) (?\{ ?\}) (?\< ?\>) (?\" ?\") (?\' ?\') (?\` ?\')) |
| 650 | (let (alist) | ||
| 651 | (map-char-table | ||
| 652 | (lambda (open close) | ||
| 653 | (when (< open close) (push (list open close) alist))) | ||
| 654 | (unicode-property-table-internal 'paired-bracket)) | ||
| 655 | (nreverse alist))) | ||
| 656 | "Alist of paired characters inserted by `insert-pair'. | 650 | "Alist of paired characters inserted by `insert-pair'. |
| 657 | Each element looks like (OPEN-CHAR CLOSE-CHAR) or (COMMAND-CHAR | 651 | Each element looks like (OPEN-CHAR CLOSE-CHAR) or (COMMAND-CHAR |
| 658 | OPEN-CHAR CLOSE-CHAR). The characters OPEN-CHAR and CLOSE-CHAR | 652 | OPEN-CHAR CLOSE-CHAR). The characters OPEN-CHAR and CLOSE-CHAR |
| @@ -661,7 +655,16 @@ or without modifiers, are inserted by `insert-pair'. | |||
| 661 | 655 | ||
| 662 | If COMMAND-CHAR is specified, it is a character that triggers the | 656 | If COMMAND-CHAR is specified, it is a character that triggers the |
| 663 | insertion of the open/close pair, and COMMAND-CHAR itself isn't | 657 | insertion of the open/close pair, and COMMAND-CHAR itself isn't |
| 664 | inserted.") | 658 | inserted." |
| 659 | :type '(repeat (choice (list :tag "Pair" | ||
| 660 | (character :tag "Open") | ||
| 661 | (character :tag "Close")) | ||
| 662 | (list :tag "Triple" | ||
| 663 | (character :tag "Command") | ||
| 664 | (character :tag "Open") | ||
| 665 | (character :tag "Close")))) | ||
| 666 | :group 'lisp | ||
| 667 | :version "27.1") | ||
| 665 | 668 | ||
| 666 | (defun insert-pair (&optional arg open close) | 669 | (defun insert-pair (&optional arg open close) |
| 667 | "Enclose following ARG sexps in a pair of OPEN and CLOSE characters. | 670 | "Enclose following ARG sexps in a pair of OPEN and CLOSE characters. |