]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/texinfo.el
Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
[gnu-emacs] / lisp / textmodes / texinfo.el
index 0e45b603c1a8a8f54e499af4e6628ae8d0c06ce1..44e839d2474527a8212b2d928e17965fa77b8c74 100644 (file)
@@ -1,7 +1,7 @@
 ;;; texinfo.el --- major mode for editing Texinfo files -*- coding: utf-8 -*-
 
-;; Copyright (C) 1985, 1988-1993, 1996-1997, 2000-2012
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1988-1993, 1996-1997, 2000-2013 Free Software
+;; Foundation, Inc.
 
 ;; Author: Robert J. Chassell
 ;; Date:   [See date below for texinfo-version]
@@ -513,8 +513,9 @@ Subexpression 1 is what goes into the corresponding `@end' statement.")
 
 (defun texinfo-current-defun-name ()
   "Return the name of the Texinfo node at point, or nil."
-  (if (re-search-backward "^@node[ \t]+\\([^,\n]+\\)" nil t)
-      (match-string-no-properties 1)))
+  (save-excursion
+    (if (re-search-backward "^@node[ \t]+\\([^,\n]+\\)" nil t)
+       (match-string-no-properties 1))))
 
 ;;; Texinfo mode
 
@@ -677,7 +678,8 @@ Puts point on a blank line between them."
         (not (match-end 1)))))
 
 (defvar texinfo-enable-quote-macros "@\\(code\\|samp\\|kbd\\)\\>")
-(defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>"))
+(defvar texinfo-enable-quote-envs
+  '("example\\>" "smallexample\\>" "lisp\\>"))
 (defun texinfo-insert-quote (&optional arg)
   "Insert the appropriate quote mark for Texinfo.
 Usually inserts the value of `texinfo-open-quote' (normally ``) or