1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

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.
This commit is contained in:
Lars Ingebrigtsen 2020-12-15 08:43:41 +01:00
parent 3806797583
commit 8bc5bd5b03

View file

@ -1302,7 +1302,8 @@ This inherits from Text mode.")
(modify-syntax-entry ?% "." st)
(modify-syntax-entry ?& "." st)
(modify-syntax-entry ?' "." st)
(modify-syntax-entry ?* "." st)
(modify-syntax-entry ?` "\"` " st)
(modify-syntax-entry ?* "\"* " st)
(modify-syntax-entry ?+ "." st)
(modify-syntax-entry ?- "." st)
(modify-syntax-entry ?/ "." st)
@ -1330,7 +1331,6 @@ The hook for `text-mode' is run before this one."
;; Pull in variable definitions silencing byte-compiler.
(require 'newcomment)
(defvar electric-pair-pairs)
(defvar electric-indent-inhibit)
;; Use rst-mode for *.rst and *.rest files. Many ReStructured-Text files
@ -1387,8 +1387,6 @@ highlighting.
(setq-local comment-region-function #'rst-comment-region)
(setq-local uncomment-region-function #'rst-uncomment-region)
(setq-local electric-pair-pairs '((?\" . ?\") (?\* . ?\*) (?\` . ?\`)))
;; Imenu and which function.
;; FIXME: Check documentation of `which-function' for alternative ways to
;; determine the current function name.