;;; reftex-auc.el --- RefTeX's interface to AUCTeX
-;; Copyright (C) 1997-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2014 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
-;; Version: 4.31
-;; Package: reftex
;; This file is part of GNU Emacs.
;;; Code:
(eval-when-compile (require 'cl))
-(provide 'reftex-auc)
+
(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 TeX-argument-prompt "ext:tex"
+ (optional prompt default &optional complete))
+(declare-function TeX-argument-insert "ext:tex"
+ (name optional &optional prefix))
(declare-function LaTeX-add-labels "ext:tex" (&rest entries) t)
+(declare-function LaTeX-add-index-entries "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)
+(declare-function multi-prompt "ext:multi-prompt"
+ (separator unique prompt table &optional
+ mp-predicate require-match initial history))
(defun reftex-plug-flag (which)
;; Tell if a certain flag is set in reftex-plug-into-AUCTeX
(and (listp reftex-plug-into-AUCTeX)
(nth which reftex-plug-into-AUCTeX))))
+;;;###autoload
(defun reftex-arg-label (optional &optional prompt definition)
"Use `reftex-label', `reftex-reference' or AUCTeX's code to insert label arg.
What is being used depends upon `reftex-plug-into-AUCTeX'."
(LaTeX-add-labels label))
(TeX-argument-insert label optional)))
+;;;###autoload
(defun reftex-arg-cite (optional &optional prompt definition)
"Use `reftex-citation' or AUCTeX's code to insert a cite-key macro argument.
What is being used depends upon `reftex-plug-into-AUCTeX'."
(let (items)
(cond
((and (not definition) (reftex-plug-flag 3))
- (setq items (list (or (reftex-citation t) ""))))
+ (setq items (or (reftex-citation t) (list ""))))
(t
(setq prompt (concat (if optional "(Optional) " "")
(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)))
+ (TeX-argument-insert (mapconcat 'identity items reftex-cite-key-separator)
+ optional)))
+;;;###autoload
(defun reftex-arg-index-tag (optional &optional prompt &rest args)
"Prompt for an index tag with completion.
This is the name of an index, not the entry."
(setq tag (read-string prompt)))
(TeX-argument-insert tag optional)))
+;;;###autoload
(defun reftex-arg-index (optional &optional prompt &rest args)
"Prompt for an index entry completing with known entries.
Completion is specific for just one index, if the macro or a tag
(t "idx")))))
(defvar LaTeX-label-function)
+;;;###autoload
(defun reftex-plug-into-AUCTeX ()
;; Replace AUCTeX functions with RefTeX functions.
;; Which functions are replaced is controlled by the variable
(fboundp 'TeX-arg-index)
(fset 'TeX-arg-index 'reftex-arg-index)))
+;;;###autoload
(defun reftex-toggle-plug-into-AUCTeX ()
"Toggle Interface between AUCTeX and RefTeX on and off."
(interactive)
(message "RefTeX has been plugged into AUCTeX.")
(message "RefTeX no longer interacts with AUCTeX.")))
+;;;###autoload
(defun reftex-add-label-environments (entry-list)
"Add label environment descriptions to `reftex-label-alist-style'.
The format of ENTRY-LIST is exactly like `reftex-label-alist'. See there
(push entry list)))
(when changed
(put reftex-docstruct-symbol 'reftex-label-alist-style list)))))
+;;;###autoload
(defalias 'reftex-add-to-label-alist 'reftex-add-label-environments)
+;;;###autoload
(defun reftex-add-section-levels (entry-list)
"Add entries to the value of `reftex-section-levels'.
The added values are kept local to the current document. The format
(when changed
(put reftex-docstruct-symbol 'reftex-section-levels list)))))
+;;;###autoload
(defun reftex-notice-new-section ()
(reftex-notice-new 1 'force))
+(provide 'reftex-auc)
+
;;; reftex-auc.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End: