Function: TeX-arg-environment
TeX-arg-environment is a byte-compiled function defined in latex.el.
Signature
(TeX-arg-environment OPTIONAL &optional PROMPT DEFINITION)
Documentation
Prompt for a LaTeX environment 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 environment to the list of defined environments.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
(defun TeX-arg-environment (optional &optional prompt definition)
"Prompt for a LaTeX environment 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 environment to
the list of defined environments."
(let ((environment (completing-read (TeX-argument-prompt optional prompt
"Environment")
(LaTeX-environment-list))))
(if (and definition (not (string-equal "" environment)))
(LaTeX-add-environments environment))
(TeX-argument-insert environment optional)))