1 |
;;; reftex-auc.el --- RefTeX's interface to AUCTeX |
;;; reftex-auc.el --- RefTeX's interface to AUCTeX |
2 |
|
;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004, 2005 |
3 |
;; Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, |
;; Free Software Foundation, Inc. |
|
;; 2005 Free Software Foundation, Inc. |
|
4 |
|
|
5 |
;; Author: Carsten Dominik <dominik@science.uva.nl> |
;; Author: Carsten Dominik <dominik@science.uva.nl> |
6 |
;; Version: 4.28 |
;; Version: VERSIONTAG |
7 |
|
|
8 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
9 |
|
|
19 |
|
|
20 |
;; You should have received a copy of the GNU General Public License |
;; You should have received a copy of the GNU General Public License |
21 |
;; along with GNU Emacs; see the file COPYING. If not, write to the |
;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 |
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
23 |
;; Boston, MA 02110-1301, USA. |
;; Boston, MA 02111-1307, USA. |
24 |
|
|
25 |
;;; Commentary: |
;;; Commentary: |
26 |
|
|
75 |
|
|
76 |
|
|
77 |
(defun reftex-arg-index-tag (optional &optional prompt &rest args) |
(defun reftex-arg-index-tag (optional &optional prompt &rest args) |
78 |
"Prompt for an index tag with completion. |
"Prompt for an index tag with completion. |
79 |
This is the name of an index, not the entry." |
This is the name of an index, not the entry." |
80 |
(let (tag taglist) |
(let (tag taglist) |
81 |
(setq prompt (concat (if optional "(Optional) " "") |
(setq prompt (concat (if optional "(Optional) " "") |
85 |
;; Use RefTeX completion |
;; Use RefTeX completion |
86 |
(progn |
(progn |
87 |
(reftex-access-scan-info nil) |
(reftex-access-scan-info nil) |
88 |
(setq taglist |
(setq taglist |
89 |
(cdr (assoc 'index-tags |
(cdr (assoc 'index-tags |
90 |
(symbol-value reftex-docstruct-symbol))) |
(symbol-value reftex-docstruct-symbol))) |
91 |
tag (completing-read prompt (mapcar 'list taglist)))) |
tag (completing-read prompt (mapcar 'list taglist)))) |
92 |
;; Just ask like AUCTeX does. |
;; Just ask like AUCTeX does. |
131 |
;; Replace AUCTeX functions with RefTeX functions. |
;; Replace AUCTeX functions with RefTeX functions. |
132 |
;; Which functions are replaced is controlled by the variable |
;; Which functions are replaced is controlled by the variable |
133 |
;; `reftex-plug-into-AUCTeX'. |
;; `reftex-plug-into-AUCTeX'. |
134 |
|
|
135 |
(if (reftex-plug-flag 0) |
(if (reftex-plug-flag 0) |
136 |
(setq LaTeX-label-function 'reftex-label) |
(setq LaTeX-label-function 'reftex-label) |
137 |
(setq LaTeX-label-function nil)) |
(setq LaTeX-label-function nil)) |
143 |
(and (reftex-plug-flag 3) |
(and (reftex-plug-flag 3) |
144 |
(fboundp 'TeX-arg-cite) |
(fboundp 'TeX-arg-cite) |
145 |
(fset 'TeX-arg-cite 'reftex-arg-cite)) |
(fset 'TeX-arg-cite 'reftex-arg-cite)) |
146 |
|
|
147 |
(and (reftex-plug-flag 4) |
(and (reftex-plug-flag 4) |
148 |
(fboundp 'TeX-arg-index-tag) |
(fboundp 'TeX-arg-index-tag) |
149 |
(fset 'TeX-arg-index-tag 'reftex-arg-index-tag)) |
(fset 'TeX-arg-index-tag 'reftex-arg-index-tag)) |
150 |
(and (reftex-plug-flag 4) |
(and (reftex-plug-flag 4) |
151 |
(fboundp 'TeX-arg-index) |
(fboundp 'TeX-arg-index) |
152 |
(fset 'TeX-arg-index 'reftex-arg-index))) |
(fset 'TeX-arg-index 'reftex-arg-index))) |
153 |
|
|