;;; reftex-ref.el --- code to create labels and references with RefTeX
-;; Copyright (C) 1997-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2015 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
(require 'reftex)
(require 'reftex-parse)
+;;;###autoload
(defun reftex-label-location (&optional bound)
"Return the environment or macro which determines the label type at point.
If optional BOUND is an integer, limit backward searches to that point."
(t ;; This should not happen, I think?
"section"))))
+;;;###autoload
(defun reftex-label-info-update (cell)
;; Update information about just one label in a different file.
;; CELL contains the old info list
(append (reftex-label-info label file) (list note)))
(list label typekey "" file "LOST LABEL. RESCAN TO FIX.")))))))
+;;;###autoload
(defun reftex-label-info (label &optional file bound derive env-or-mac)
;; Return info list on LABEL at point.
(let* ((prefix (if (string-match "^[a-zA-Z0-9]+:" label)
;;; Creating labels ---------------------------------------------------------
+;;;###autoload
(defun reftex-label (&optional environment no-insert)
"Insert a unique label. Return the label.
If ENVIRONMENT is given, don't bother to find out yourself.
a / A Put all marked entries into one/many \\ref commands.
q / RET Quit without referencing / Accept current label (also on mouse-2).")
+;;;###autoload
(defun reftex-reference (&optional type no-insert cut)
"Make a LaTeX reference. Look only for labels of a certain TYPE.
With prefix arg, force to rescan buffer for labels. This should only be
(file (nth 3 data)))
(reftex-access-scan-info arg file)))))
+;;;###autoload
(defun reftex-query-label-type ()
;; Ask for label type
(let ((key (reftex-select-with-char
(error "No such label type: %s" (char-to-string key)))
(char-to-string key)))
+;;;###autoload
(defun reftex-show-label-location (data forward no-revisit
&optional stay error)
;; View the definition site of a label in another window.
Replace any occurrences of \"\\ref\" with REFSTYLE."
;; Replace instances of \ref in `fmt' with the special reference
;; style selected by the user.
- (while (string-match "\\(\\\\ref\\)[ \t]*{" fmt)
- (setq fmt (replace-match refstyle t t fmt 1)))
+ (cond
+ ((while (string-match "\\(\\\\ref\\)[ \t]*{" fmt)
+ (setq fmt (replace-match refstyle t t fmt 1))))
+ ((string-match "\\(\\\\[[:alpha:]]+\\)[ \t]*{" fmt)
+ (setq fmt (replace-match refstyle t t fmt 1))))
(format fmt label))
+;;;###autoload
(defun reftex-goto-label (&optional other-window)
"Prompt for a label (with completion) and jump to the location of this label.
Optional prefix argument OTHER-WINDOW goes to the label in another window."
(provide 'reftex-ref)
;;; reftex-ref.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End: