Function: ibuffer-list-buffer-modes

ibuffer-list-buffer-modes is a byte-compiled function defined in ibuf-ext.el.gz.

Signature

(ibuffer-list-buffer-modes &optional INCLUDE-PARENTS)

Documentation

Create a completion table of buffer modes currently in use.

If INCLUDE-PARENTS is non-nil then include parent modes.

Source Code

;; Defined in /usr/src/emacs/lisp/ibuf-ext.el.gz
(defun ibuffer-list-buffer-modes (&optional include-parents)
  "Create a completion table of buffer modes currently in use.
If INCLUDE-PARENTS is non-nil then include parent modes."
  (let ((modes))
    (dolist (buf (buffer-list))
      (let ((this-mode (buffer-local-value 'major-mode buf)))
        (while (and this-mode (not (memq this-mode modes)))
          (push this-mode modes)
          (setq this-mode (and include-parents
                               (get this-mode 'derived-mode-parent))))))
    (mapcar #'symbol-name modes)))