Function: reftex-arg-index

reftex-arg-index is an autoloaded and byte-compiled function defined in reftex-auc.el.gz.

Signature

(reftex-arg-index OPTIONAL &optional PROMPT &rest ARGS)

Documentation

Prompt for an index entry completing with known entries.

Completion is specific for just one index, if the macro or a tag argument identify one of multiple indices.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-auc.el.gz
;;;###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
argument identify one of multiple indices."
  (let* (tag key)
    (if (and reftex-support-index (reftex-plug-flag 4))
        (progn
          (reftex-access-scan-info nil)
          (setq tag (reftex-what-index-tag)
                key (reftex-index-complete-key (or tag "idx"))))
      (setq key (completing-read (TeX-argument-prompt optional prompt "Key")
                                 (LaTeX-index-entry-list))))
    (unless (string-equal "" key)
      (LaTeX-add-index-entries key))
    (TeX-argument-insert key optional)))