Function: TeX-insert-macro
TeX-insert-macro is an interactive and byte-compiled function defined
in tex.el.
Signature
(TeX-insert-macro SYMBOL)
Documentation
Insert TeX macro SYMBOL with completion.
AUCTeX knows of some macros and may query for extra arguments, depending on
the value of TeX-insert-macro-default-style and whether TeX-insert-macro
is called with C-u (universal-argument).
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-insert-macro (symbol)
"Insert TeX macro SYMBOL with completion.
AUCTeX knows of some macros and may query for extra arguments, depending on
the value of `TeX-insert-macro-default-style' and whether `TeX-insert-macro'
is called with \\[universal-argument]."
;; When called with a prefix (C-u), only ask for mandatory arguments,
;; i.e. all optional arguments are skipped. See `TeX-parse-arguments' for
;; details. Note that this behavior may be changed in favor of a more
;; flexible solution in the future, therefore we don't document it at the
;; moment.
(interactive (list
(let ((completion-extra-properties
(list :annotation-function
#'TeX--completion-annotation-function)))
(completing-read (concat "Macro (default "
TeX-default-macro
"): "
TeX-esc)
(TeX--symbol-completion-table) nil nil nil
'TeX-macro-history TeX-default-macro))))
(when (called-interactively-p 'any)
(setq TeX-default-macro symbol))
(atomic-change-group
(TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list))))
(run-hooks 'TeX-after-insert-macro-hook)))