Function: TeX-arg-macro
TeX-arg-macro is a byte-compiled function defined in latex.el.
Signature
(TeX-arg-macro OPTIONAL &optional PROMPT DEFINITION)
Documentation
Prompt for a TeX macro with completion.
If OPTIONAL is non-nil, insert the resulting value as an optional argument, otherwise as a mandatory one. Use PROMPT as the prompt string. If DEFINITION is non-nil, add the chosen macro to the list of defined macros.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
(defun TeX-arg-macro (optional &optional prompt definition)
"Prompt for a TeX macro with completion.
If OPTIONAL is non-nil, insert the resulting value as an optional
argument, otherwise as a mandatory one. Use PROMPT as the prompt
string. If DEFINITION is non-nil, add the chosen macro to the
list of defined macros."
(let ((macro (completing-read (TeX-argument-prompt optional prompt
(concat "Macro: "
TeX-esc)
t)
(TeX-symbol-list))))
(if (and definition (not (string-equal "" macro)))
(TeX-add-symbols macro))
(TeX-argument-insert macro optional TeX-esc)))