Function: TeX-auto-list-information

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

Signature

(TeX-auto-list-information NAME)

Documentation

Return information in TeX-auto-parser about NAME.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-auto-list-information (name)
  "Return information in `TeX-auto-parser' about NAME."
  (TeX-update-style)
  (let* ((entry (assoc name TeX-auto-parser))
         (change (nth TeX-auto-parser-change entry))
         (change-value (symbol-value change))
         (local (nth TeX-auto-parser-local entry)))
    (if (not change-value)
        ()
      (set change nil)
      ;; Sort it
      (message "Sorting %s..." name)
      (set local
           (sort (mapcar #'TeX-listify (apply #'append (symbol-value local)))
                 #'TeX-car-string-lessp))
      (message "Sorting %s...done" name)
      ;; Make it unique
      (message "Removing duplicates...")
      (let ((entry (symbol-value local)))
        (while (and entry (cdr entry))
          (let ((this (car entry))
                (next (car (cdr entry))))
            (if (not (string-equal (car this) (car next)))
                (setq entry (cdr entry))
              ;; We have two equal symbols.  Use the one with
              ;; most arguments.
              (if (> (length next) (length this))
                  (setcdr this (cdr next)))
              (setcdr entry (cdr (cdr entry)))))))
      (message "Removing duplicates...done"))
    (symbol-value local)))