Function: reftex-arg-index-tag

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

Signature

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

Documentation

Prompt for an index tag with completion.

This is the name of an index, not the entry.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-auc.el.gz
;;;###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."
  (let (tag taglist)
    (setq prompt (concat (if optional "(Optional) " "")
			 (if prompt prompt "Index tag")
			 " (default none): "))
    (if (and reftex-support-index (reftex-plug-flag 4))
        ;; Use RefTeX completion
        (progn
          (reftex-access-scan-info nil)
          (setq taglist
                (cdr (assoc 'index-tags
                            (symbol-value reftex-docstruct-symbol)))
                tag (completing-read prompt (mapcar #'list taglist))))
      ;; Just ask like AUCTeX does.
      (setq tag (read-string prompt)))
    (TeX-argument-insert tag optional)))