Function: LaTeX-section-list-add-locally

LaTeX-section-list-add-locally is a byte-compiled function defined in latex.el.

Signature

(LaTeX-section-list-add-locally SECTIONS &optional CLEAN)

Documentation

Add SECTIONS to LaTeX-section-list.

SECTIONS can be a single list containing the section macro name as a string and the level as an integer or a list of such lists.

If optional argument CLEAN is non-nil, remove any existing entries from LaTeX-section-list before adding the new ones.

The function will make LaTeX-section-list buffer-local and invalidate the section submenu in order to let the menu filter regenerate it. It is mainly a convenience function which can be used in style files.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
(defun LaTeX-section-list-add-locally (sections &optional clean)
  "Add SECTIONS to `LaTeX-section-list'.
SECTIONS can be a single list containing the section macro name
as a string and the level as an integer or a list of such lists.

If optional argument CLEAN is non-nil, remove any existing
entries from `LaTeX-section-list' before adding the new ones.

The function will make `LaTeX-section-list' buffer-local and
invalidate the section submenu in order to let the menu filter
regenerate it.  It is mainly a convenience function which can be
used in style files."
  (when (stringp (car sections))
    (setq sections (list sections)))
  (make-local-variable 'LaTeX-section-list)
  (when clean (setq LaTeX-section-list nil))
  (dolist (elt sections) (add-to-list 'LaTeX-section-list elt t))
  (setq LaTeX-section-list
        (sort (copy-sequence LaTeX-section-list)
              (lambda (a b) (< (nth 1 a) (nth 1 b)))))
  (setq LaTeX-section-menu nil))