Function: LaTeX-section-heading

LaTeX-section-heading is a byte-compiled function defined in latex.el.

Signature

(LaTeX-section-heading)

Documentation

Hook to prompt for LaTeX section name.

Insert this hook into LaTeX-section-hook to allow the user to change the name of the sectioning command inserted with M-x LaTeX-section (LaTeX-section).

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
;;; Section Hooks.

(defun LaTeX-section-heading ()
  "Hook to prompt for LaTeX section name.
Insert this hook into `LaTeX-section-hook' to allow the user to change
the name of the sectioning command inserted with \\[LaTeX-section]."
  (let ((string (completing-read
                 (format-prompt "Level" LaTeX-name)
                 (append
                  ;; Include starred variants in candidates.
                  (mapcar (lambda (sct)
                            (list (concat (car sct) "*")))
                          LaTeX-section-list)
                  LaTeX-section-list)
                 nil nil nil nil LaTeX-name)))
    ;; Update LaTeX-name
    (if (not (zerop (length string)))
        (setq LaTeX-name string))
    ;; Update level
    (setq LaTeX-level (LaTeX-section-level LaTeX-name))))