1 |
;;; reftex-auc.el --- RefTeX's interface to AUC TeX |
;;; reftex-auc.el --- RefTeX's interface to AUC TeX |
2 |
;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
3 |
|
|
4 |
;; Author: Carsten Dominik <dominik@strw.LeidenUniv.nl> |
;; Author: Carsten Dominik <dominik@science.uva.nl> |
5 |
;; Version: 4.16 |
;; Version: 4.18 |
6 |
|
|
7 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
8 |
|
|
74 |
|
|
75 |
|
|
76 |
(defun reftex-arg-index-tag (optional &optional prompt &rest args) |
(defun reftex-arg-index-tag (optional &optional prompt &rest args) |
77 |
"Prompt for an index tag with completion. |
"Prompt for an index tag with completion. |
78 |
This is the name of an index, not the entry." |
This is the name of an index, not the entry." |
79 |
(let (tag taglist) |
(let (tag taglist) |
80 |
(setq prompt (concat (if optional "(Optional) " "") |
(setq prompt (concat (if optional "(Optional) " "") |
84 |
;; Use RefTeX completion |
;; Use RefTeX completion |
85 |
(progn |
(progn |
86 |
(reftex-access-scan-info nil) |
(reftex-access-scan-info nil) |
87 |
(setq taglist |
(setq taglist |
88 |
(cdr (assoc 'index-tags |
(cdr (assoc 'index-tags |
89 |
(symbol-value reftex-docstruct-symbol))) |
(symbol-value reftex-docstruct-symbol))) |
90 |
tag (completing-read prompt (mapcar 'list taglist)))) |
tag (completing-read prompt (mapcar 'list taglist)))) |
91 |
;; Just ask like AUCTeX does. |
;; Just ask like AUCTeX does. |
130 |
;; Replace AUCTeX functions with RefTeX functions. |
;; Replace AUCTeX functions with RefTeX functions. |
131 |
;; Which functions are replaced is controlled by the variable |
;; Which functions are replaced is controlled by the variable |
132 |
;; `reftex-plug-into-AUCTeX'. |
;; `reftex-plug-into-AUCTeX'. |
133 |
|
|
134 |
(if (reftex-plug-flag 0) |
(if (reftex-plug-flag 0) |
135 |
(setq LaTeX-label-function 'reftex-label) |
(setq LaTeX-label-function 'reftex-label) |
136 |
(setq LaTeX-label-function nil)) |
(setq LaTeX-label-function nil)) |
142 |
(and (reftex-plug-flag 3) |
(and (reftex-plug-flag 3) |
143 |
(fboundp 'TeX-arg-cite) |
(fboundp 'TeX-arg-cite) |
144 |
(fset 'TeX-arg-cite 'reftex-arg-cite)) |
(fset 'TeX-arg-cite 'reftex-arg-cite)) |
145 |
|
|
146 |
(and (reftex-plug-flag 4) |
(and (reftex-plug-flag 4) |
147 |
(fboundp 'TeX-arg-index-tag) |
(fboundp 'TeX-arg-index-tag) |
148 |
(fset 'TeX-arg-index-tag 'reftex-arg-index-tag)) |
(fset 'TeX-arg-index-tag 'reftex-arg-index-tag)) |
149 |
(and (reftex-plug-flag 4) |
(and (reftex-plug-flag 4) |
150 |
(fboundp 'TeX-arg-index) |
(fboundp 'TeX-arg-index) |
151 |
(fset 'TeX-arg-index 'reftex-arg-index))) |
(fset 'TeX-arg-index 'reftex-arg-index))) |
152 |
|
|