all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Sebastian Wiesner <lunaryorn@gmail.com>
Cc: 17131-done@debbugs.gnu.org
Subject: bug#17131: 24.4.50; rst-mode is missing electric-pairs
Date: Mon, 28 Apr 2014 11:05:10 -0400	[thread overview]
Message-ID: <jwvmwf5wl9h.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <m27g7ebcog.fsf@lunaryorn-air.fritz.box> (Sebastian Wiesner's message of "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.

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.






      reply	other threads:[~2014-04-28 15:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvmwf5wl9h.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=17131-done@debbugs.gnu.org \
    --cc=lunaryorn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.