Function: reftex-index-complete-tag

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

Signature

(reftex-index-complete-tag &optional ITAG OPT-ARGS)

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-index.el.gz
;;;###autoload
(defun reftex-index-complete-tag (&optional itag opt-args)
  ;; Ask the user for a tag, completing on known tags.
  ;; ITAG is the argument number which contains the tag.
  ;; OPT-ARGS is a list of optional argument indices, as given by
  ;; `reftex-parse-args'.
  (let* ((opt (and (integerp itag) (member itag opt-args)))
	 (index-tags (cdr (assq 'index-tags
				(symbol-value reftex-docstruct-symbol))))
	 (default (reftex-default-index))
	 (prompt (concat "Index tag"
			 (if (or opt default)
			     (format " (%s): "
				     (concat
				      (if opt "optional" "")
				      (if default
					  (concat (if opt ", " "")
						  (format "default %s" default))
					"")))
			   ": ")))
	 (tag (completing-read prompt (mapcar #'list index-tags))))
    (if (and default (equal tag "")) (setq tag default))
    (reftex-update-default-index tag)
    tag))