emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#17131: closed (24.4.50; rst-mode is missing electr


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17131: closed (24.4.50; rst-mode is missing electric-pairs)
Date: Mon, 28 Apr 2014 15:06:02 +0000

Your message dated Mon, 28 Apr 2014 11:05:10 -0400
with message-id <address@hidden>
and subject line Re: bug#17131: 24.4.50; rst-mode is missing electric-pairs
has caused the debbugs.gnu.org bug report #17131,
regarding 24.4.50; rst-mode is missing electric-pairs
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17131: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17131
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.4.50; rst-mode is missing electric-pairs Date: Fri, 28 Mar 2014 15:49:51 +0100
With electric-pairs-mode enabled, rst-mode does not pair * and ` (the
backtick).  The star is used for emphasis and strong markup as in
*emphasized* and **bold**, and the backtick is even more ubiquitous, as
it surrounds literal text, references, and role arguments.



--- End Message ---
--- Begin Message --- Subject: Re: bug#17131: 24.4.50; rst-mode is missing electric-pairs Date: Mon, 28 Apr 2014 11:05:10 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)
> With electric-pairs-mode enabled, rst-mode does not pair * and ` (the
> backtick).  The star is used for emphasis and strong markup as in
> *emphasized* and **bold**, and the backtick is even more ubiquitous, as
> it surrounds literal text, references, and role arguments.

I installed the patch below into emacs-24 which should fix it, thank you,


        Stefan


=== modified file 'lisp/textmodes/rst.el'
--- lisp/textmodes/rst.el       2014-03-16 03:47:31 +0000
+++ lisp/textmodes/rst.el       2014-04-28 14:59:46 +0000
@@ -799,6 +797,8 @@
 ;; Pull in variable definitions silencing byte-compiler.
 (require 'newcomment)
 
+(defvar electric-pair-pairs)
+
 ;; Use rst-mode for *.rst and *.rest files.  Many ReStructured-Text files
 ;; use *.txt, but this is too generic to be set as a default.
 ;;;###autoload (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . 
rst-mode)))
@@ -860,6 +860,9 @@
   (set (make-local-variable 'uncomment-region-function)
        'rst-uncomment-region)
 
+  (set (make-local-variable 'electric-pair-pairs)
+       '((?\" . ?\") (?\* . ?\*) (?\` . ?\`)))
+
   ;; Imenu and which function.
   ;; FIXME: Check documentation of `which-function' for alternative ways to
   ;;        determine the current function name.



--- End Message ---

reply via email to

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