summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-04-28 11:04:49 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-04-28 11:04:49 -0400
commit4f5fa75591973935b59beb0b66ffbfcbc9ee63cc (patch)
treee8efd4a5613919865db7903bf20c4b8879ffa245 /lisp/textmodes
parent8e554df009bc64b4e5e75028f36c397ba78596b4 (diff)
downloademacs-4f5fa75591973935b59beb0b66ffbfcbc9ee63cc.tar.gz
* lisp/textmodes/rst.el (electric-pair-pairs): Declare.
(rst-mode): Set it. Fixes: debbugs:17131
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/rst.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index d4a3438ce97..b05a5e5a7e3 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -784,11 +784,9 @@ This inherits from Text mode.")
(modify-syntax-entry ?\u2019 "." st)
(modify-syntax-entry ?\u201c "." st)
(modify-syntax-entry ?\u201d "." st)
-
st)
"Syntax table used while in `rst-mode'.")
-
(defcustom rst-mode-hook nil
"Hook run when `rst-mode' is turned on.
The hook for `text-mode' is run before this one."
@@ -799,6 +797,8 @@ The hook for `text-mode' is run before this one."
;; 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 @@ highlighting.
(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.