Function: TeX-mode-specific-command-list

TeX-mode-specific-command-list is a byte-compiled function defined in tex.el.

Signature

(TeX-mode-specific-command-list MODE)

Documentation

Return the list of commands available in the given MODE.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-mode-specific-command-list (mode)
  "Return the list of commands available in the given MODE."
  (let ((full-list TeX-command-list)
        out-list
        entry fourth-element
        former-mode)
    (while (setq entry (pop full-list))
      (setq fourth-element (nth 4 entry))
      ;; `(nth 4 entry)' may be either an atom in case of which the
      ;; entry should be present in any mode or a list of major modes.
      (if (or (atom fourth-element)
              (memq mode fourth-element)
              ;; Compatibility for former mode names.  The user can
              ;; have customized `TeX-command-list' with former mode
              ;; names listed in `(nth 4 entry)'.
              (and (setq former-mode
                         (car (rassq mode TeX-mode-comparison-alist)))
                   (memq former-mode fourth-element)))
          (push entry out-list)))
    (nreverse out-list)))