all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17131: 24.4.50; rst-mode is missing electric-pairs
@ 2014-03-28 14:49 Sebastian Wiesner
  2014-04-28 15:05 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Wiesner @ 2014-03-28 14:49 UTC (permalink / raw)
  To: 17131

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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#17131: 24.4.50; rst-mode is missing electric-pairs
  2014-03-28 14:49 bug#17131: 24.4.50; rst-mode is missing electric-pairs Sebastian Wiesner
@ 2014-04-28 15:05 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-04-28 15:05 UTC (permalink / raw)
  To: Sebastian Wiesner; +Cc: 17131-done

> 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.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-28 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28 14:49 bug#17131: 24.4.50; rst-mode is missing electric-pairs Sebastian Wiesner
2014-04-28 15:05 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.