]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/rst.el
Merge from emacs-24; up to 117691
[gnu-emacs] / lisp / textmodes / rst.el
index d4a3438ce972aabc10785003eb758f07d74da56d..5ea0b419d2298ecb9c7fd103d8cba373df3f51f6 100644 (file)
@@ -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.
@@ -3118,7 +3121,7 @@ newlines as mandated by `comment-line-break-function'."
 
 (defun rst-comment-region (beg end &optional arg)
   "Comment or uncomment the current region.
-Region is from from BEG to END.  Uncomment if ARG."
+Region is from BEG to END.  Uncomment if ARG."
   (save-excursion
     (if (consp arg)
        (rst-uncomment-region beg end arg)