]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/reftex-auc.el
Add 2010 to copyright years.
[gnu-emacs] / lisp / textmodes / reftex-auc.el
index f94a9d0956f0629b9264b86b0b8379298d2a0116..498148f0de4b4c1be09ad6f9eeb17c7d6be6c530 100644 (file)
@@ -1,16 +1,18 @@
 ;;; reftex-auc.el --- RefTeX's interface to AUCTeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005
-;;  Free Software Foundation, Inc.
+
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+;;   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: VERSIONTAG
+;; Maintainer: auctex-devel@gnu.org
+;; Version: 4.31
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,9 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
 (require 'reftex)
 ;;;
 
+(declare-function TeX-argument-insert "ext:tex" (name optional &optional prefix))
+(declare-function TeX-argument-prompt "ext:tex" (optional prompt default &optional complete))
+(declare-function multi-prompt "ext:multi-prompt" 
+                 (separator
+                  unique prompt table
+                  &optional mp-predicate require-match initial history))
+(declare-function LaTeX-add-index-entries "ext:tex" (&rest entries) t)
+(declare-function LaTeX-add-labels "ext:tex" (&rest entries) t)
+(declare-function LaTeX-bibitem-list "ext:tex" () t)
+(declare-function LaTeX-index-entry-list "ext:tex" () t)
+(declare-function LaTeX-label-list "ext:tex" () t)
+
 (defun reftex-plug-flag (which)
   ;; Tell if a certain flag is set in reftex-plug-into-AUCTeX
   (or (eq t reftex-plug-into-AUCTeX)
@@ -67,26 +79,26 @@ What is being used depends upon `reftex-plug-into-AUCTeX'."
       (setq items (list (or (reftex-citation t) ""))))
      (t
       (setq prompt (concat (if optional "(Optional) " "")
-                           (if prompt prompt "Add key")
-                           ": (default none) "))
+                          (if prompt prompt "Add key")
+                          " (default none): "))
       (setq items (multi-prompt "," t prompt (LaTeX-bibitem-list)))))
     (apply 'LaTeX-add-bibitems items)
     (TeX-argument-insert (mapconcat 'identity items ",") optional)))
 
 
 (defun reftex-arg-index-tag (optional &optional prompt &rest args)
-  "Prompt for an index tag with completion. 
+  "Prompt for an index tag with completion.
 This is the name of an index, not the entry."
   (let (tag taglist)
     (setq prompt (concat (if optional "(Optional) " "")
-                         (if prompt prompt "Index tag")
-                         ": (default none) "))
+                        (if prompt prompt "Index tag")
+                        " (default none): "))
     (if (and reftex-support-index (reftex-plug-flag 4))
         ;; Use RefTeX completion
         (progn
           (reftex-access-scan-info nil)
-          (setq taglist 
-                (cdr (assoc 'index-tags 
+          (setq taglist
+                (cdr (assoc 'index-tags
                             (symbol-value reftex-docstruct-symbol)))
                 tag (completing-read prompt (mapcar 'list taglist))))
       ;; Just ask like AUCTeX does.
@@ -131,7 +143,7 @@ argument identify one of multiple indices."
   ;; Replace AUCTeX functions with RefTeX functions.
   ;; Which functions are replaced is controlled by the variable
   ;; `reftex-plug-into-AUCTeX'.
-  
+
   (if (reftex-plug-flag 0)
       (setq LaTeX-label-function 'reftex-label)
     (setq LaTeX-label-function nil))
@@ -143,11 +155,11 @@ argument identify one of multiple indices."
   (and (reftex-plug-flag 3)
        (fboundp 'TeX-arg-cite)
        (fset 'TeX-arg-cite 'reftex-arg-cite))
-  
-  (and (reftex-plug-flag 4) 
+
+  (and (reftex-plug-flag 4)
        (fboundp 'TeX-arg-index-tag)
        (fset 'TeX-arg-index-tag 'reftex-arg-index-tag))
-  (and (reftex-plug-flag 4) 
+  (and (reftex-plug-flag 4)
        (fboundp 'TeX-arg-index)
        (fset 'TeX-arg-index 'reftex-arg-index)))
 
@@ -211,5 +223,5 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL).  See
 (defun reftex-notice-new-section ()
   (reftex-notice-new 1 'force))
 
-;;; arch-tag: 4a798e68-3405-421c-a09b-0269aac64ab4
+;; arch-tag: 4a798e68-3405-421c-a09b-0269aac64ab4
 ;;; reftex-auc.el ends here