Function: TeX-argument-insert

TeX-argument-insert is a byte-compiled function defined in tex.el.

Signature

(TeX-argument-insert NAME OPTIONAL &optional PREFIX)

Documentation

Insert NAME surrounded by curly braces.

If OPTIONAL, only insert it if not empty, and then use square brackets. If PREFIX is given, insert it before NAME.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-argument-insert (name optional &optional prefix)
  "Insert NAME surrounded by curly braces.

If OPTIONAL, only insert it if not empty, and then use square brackets.
If PREFIX is given, insert it before NAME."
  (if (and optional (string-equal name ""))
      (setq TeX-last-optional-rejected t)
    (insert TeX-arg-opening-brace)
    (if prefix
        (insert prefix))
    (if (and (string-equal name "")
             (null (marker-position TeX-exit-mark)))
        (set-marker TeX-exit-mark (point))
      (insert name))
    (insert TeX-arg-closing-brace)))