emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8bc5bd5: Fix electric pairs in rst-mode


From: Lars Ingebrigtsen
Subject: master 8bc5bd5: Fix electric pairs in rst-mode
Date: Tue, 15 Dec 2020 02:43:49 -0500 (EST)

branch: master
commit 8bc5bd5b03cfc1994734b5903f98dccc0cdf004f
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/textmodes/rst.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 7a7ac47..435de26 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]