Function: LaTeX-completion-label-list

LaTeX-completion-label-list is a byte-compiled function defined in latex.el.

Signature

(LaTeX-completion-label-list)

Documentation

Return a list of defined labels for in-buffer completion.

This function checks if RefTeX mode is activated and extracts the labels from there. Otherwise the AUCTeX label list is returned. If the list of offered labels is out of sync, re-parse the document with reftex-parse-all or TeX-normal-mode.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
(defun LaTeX-completion-label-list ()
  "Return a list of defined labels for in-buffer completion.
This function checks if RefTeX mode is activated and extracts the
labels from there.  Otherwise the AUCTeX label list is returned.
If the list of offered labels is out of sync, re-parse the
document with `reftex-parse-all' or `TeX-normal-mode'."
  (if (and (bound-and-true-p reftex-mode)
           (fboundp 'reftex-access-scan-info)
           (boundp 'reftex-docstruct-symbol))
      (progn
        (reftex-access-scan-info)
        (let ((docstruct (symbol-value reftex-docstruct-symbol))
              labels)
          (dolist (label docstruct labels)
            (when (stringp (car label))
              (push (car label) labels)))))
    (LaTeX-label-list)))