]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/reftex.el
Merge.
[gnu-emacs] / lisp / textmodes / reftex.el
index 2a2e725e92ee10a5a414ee3bf22ca798ba5f7e5d..cef8a3d1548d04994f590aba95189a1e0b09c228 100644 (file)
@@ -1,6 +1,5 @@
 ;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX
-;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2000, 2003-2011 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
 ;; Maintainer: auctex-devel@gnu.org
 (put 'reftex-mode :menu-tag "RefTeX Mode")
 ;;;###autoload
 (define-minor-mode reftex-mode
-  "Minor mode with distinct support for \\label, \\ref and \\cite in LaTeX.
+  "Toggle RefTeX mode.
+With a prefix argument ARG, enable RefTeX mode if ARG is
+positive, and disable it otherwise.  If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+RefTeX mode is a buffer-local minor mode with distinct support
+for \\label, \\ref and \\cite in LaTeX.
 
 \\<reftex-mode-map>A Table of Contents of the entire (multifile) document with browsing
 capabilities is available with `\\[reftex-toc]'.
@@ -568,7 +573,7 @@ on the menu bar.
   "Save RefTeX's parse file for this buffer if the information has changed."
   ;; Save the parsing information if it was modified.
   ;; This function should be installed in `kill-buffer-hook'.
-  ;; We are careful to make sure nothing goes wring in this function.
+  ;; We are careful to make sure nothing goes wrong in this function.
   (when (and (boundp 'reftex-mode)  reftex-mode
              (boundp 'reftex-save-parse-info)  reftex-save-parse-info
              (boundp 'reftex-docstruct-symbol)  reftex-docstruct-symbol
@@ -1517,7 +1522,7 @@ Valid actions are: readable, restore, read, kill, write."
 ;;;    (while all
 ;;;      (when (and (eq (car (car all)) 'bof)
 ;;;              (not (file-regular-p (nth 1 (car all)))))
-;;;     (message "File %s in saved parse info not avalable" (cdr (car all)))
+;;;     (message "File %s in saved parse info not available" (cdr (car all)))
 ;;;     (error "File not found"))
 ;;;      (setq all (cdr all))))
   )
@@ -2398,7 +2403,7 @@ IGNORE-WORDS List of words which should be removed from the string."
   (define-key reftex-mode-map
     reftex-extra-bindings-prefix
     reftex-extra-bindings-map))
-    
+
 
 ;;; =========================================================================
 ;;;
@@ -2569,7 +2574,8 @@ With optional NODE, go directly to that node."
 ;;; Install the kill-buffer and kill-emacs hooks ------------------------------
 
 (add-hook 'kill-buffer-hook 'reftex-kill-buffer-hook)
-(add-hook 'kill-emacs-hook  'reftex-kill-emacs-hook)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook  'reftex-kill-emacs-hook))
 
 ;;; Run Hook ------------------------------------------------------------------
 
@@ -2582,5 +2588,4 @@ With optional NODE, go directly to that node."
 
 ;;;============================================================================
 
-;; arch-tag: 49e0da4e-bd5e-4cfc-a717-fb444fccb9e6
 ;;; reftex.el ends here