Function: TeX-auto-insert

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

Signature

(TeX-auto-insert ENTRY &optional SKIP)

Documentation

Insert code to initialize ENTRY from TeX-auto-parser.

If SKIP is not-nil, don't insert code for SKIP.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-auto-insert (entry &optional skip)
  "Insert code to initialize ENTRY from `TeX-auto-parser'.

If SKIP is not-nil, don't insert code for SKIP."
  (let ((name (symbol-name (nth TeX-auto-parser-add entry)))
        (list (symbol-value (nth TeX-auto-parser-temporary entry))))
    (unless (null list)
      (insert "\n   (" name)
      (dolist (el list)
        (cond ((and (stringp el) (not (string= el skip)))
               (insert "\n    ")
               (insert (prin1-to-string el)))
              ((not (stringp el))
               (insert "\n    ")
               (insert "'" (prin1-to-string el)))))
      (insert ")"))))