diff options
| author | Lars Ingebrigtsen | 2020-12-15 08:43:41 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-12-15 08:43:41 +0100 |
| commit | 8bc5bd5b03cfc1994734b5903f98dccc0cdf004f (patch) | |
| tree | b0065529a0db94f44738e63e2600c0088d9c3729 | |
| parent | 3806797583a22ad520e64f7fc35d893840f0d563 (diff) | |
| download | emacs-8bc5bd5b03cfc1994734b5903f98dccc0cdf004f.tar.gz emacs-8bc5bd5b03cfc1994734b5903f98dccc0cdf004f.zip | |
Fix electric pairs in rst-mode
* lisp/textmodes/rst.el (rst-mode-syntax-table): Mark pairs in the
syntax table (bug#23413).
(rst-mode): Instead of setting electric-pair-pairs.
| -rw-r--r-- | lisp/textmodes/rst.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 7a7ac478b76..435de2683ef 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el | |||
| @@ -1302,7 +1302,8 @@ This inherits from Text mode.") | |||
| 1302 | (modify-syntax-entry ?% "." st) | 1302 | (modify-syntax-entry ?% "." st) |
| 1303 | (modify-syntax-entry ?& "." st) | 1303 | (modify-syntax-entry ?& "." st) |
| 1304 | (modify-syntax-entry ?' "." st) | 1304 | (modify-syntax-entry ?' "." st) |
| 1305 | (modify-syntax-entry ?* "." st) | 1305 | (modify-syntax-entry ?` "\"` " st) |
| 1306 | (modify-syntax-entry ?* "\"* " st) | ||
| 1306 | (modify-syntax-entry ?+ "." st) | 1307 | (modify-syntax-entry ?+ "." st) |
| 1307 | (modify-syntax-entry ?- "." st) | 1308 | (modify-syntax-entry ?- "." st) |
| 1308 | (modify-syntax-entry ?/ "." st) | 1309 | (modify-syntax-entry ?/ "." st) |
| @@ -1330,7 +1331,6 @@ The hook for `text-mode' is run before this one." | |||
| 1330 | ;; Pull in variable definitions silencing byte-compiler. | 1331 | ;; Pull in variable definitions silencing byte-compiler. |
| 1331 | (require 'newcomment) | 1332 | (require 'newcomment) |
| 1332 | 1333 | ||
| 1333 | (defvar electric-pair-pairs) | ||
| 1334 | (defvar electric-indent-inhibit) | 1334 | (defvar electric-indent-inhibit) |
| 1335 | 1335 | ||
| 1336 | ;; Use rst-mode for *.rst and *.rest files. Many ReStructured-Text files | 1336 | ;; Use rst-mode for *.rst and *.rest files. Many ReStructured-Text files |
| @@ -1387,8 +1387,6 @@ highlighting. | |||
| 1387 | (setq-local comment-region-function #'rst-comment-region) | 1387 | (setq-local comment-region-function #'rst-comment-region) |
| 1388 | (setq-local uncomment-region-function #'rst-uncomment-region) | 1388 | (setq-local uncomment-region-function #'rst-uncomment-region) |
| 1389 | 1389 | ||
| 1390 | (setq-local electric-pair-pairs '((?\" . ?\") (?\* . ?\*) (?\` . ?\`))) | ||
| 1391 | |||
| 1392 | ;; Imenu and which function. | 1390 | ;; Imenu and which function. |
| 1393 | ;; FIXME: Check documentation of `which-function' for alternative ways to | 1391 | ;; FIXME: Check documentation of `which-function' for alternative ways to |
| 1394 | ;; determine the current function name. | 1392 | ;; determine the current function name. |