Function: list-buffers-noselect

list-buffers-noselect is a byte-compiled function defined in buff-menu.el.gz.

Signature

(list-buffers-noselect &optional FILES-ONLY BUFFER-LIST FILTER-PREDICATE)

Documentation

Create and return a Buffer Menu buffer.

This is called by buffer-menu and others as a subroutine.

If FILES-ONLY is non-nil, show only file-visiting buffers. If BUFFER-LIST is non-nil, it should be either a list of buffers or a function that returns a list of buffers; it means list those buffers and no others. See more at Buffer-menu-buffer-list. If FILTER-PREDICATE is non-nil, it should be a function that filters out buffers from the list of buffers. See more at Buffer-menu-filter-predicate.

Probably introduced at or before Emacs version 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/buff-menu.el.gz
;;; Functions for populating the Buffer Menu.

;;;###autoload
(defun list-buffers-noselect (&optional files-only buffer-list filter-predicate)
  "Create and return a Buffer Menu buffer.
This is called by `buffer-menu' and others as a subroutine.

If FILES-ONLY is non-nil, show only file-visiting buffers.
If BUFFER-LIST is non-nil, it should be either a list of buffers
or a function that returns a list of buffers; it means
list those buffers and no others.
See more at `Buffer-menu-buffer-list'.
If FILTER-PREDICATE is non-nil, it should be a function
that filters out buffers from the list of buffers.
See more at `Buffer-menu-filter-predicate'."
  (let ((old-buffer (current-buffer))
	(buffer (get-buffer-create "*Buffer List*")))
    (with-current-buffer buffer
      (Buffer-menu-mode)
      (setq Buffer-menu-files-only
	    (and files-only (>= (prefix-numeric-value files-only) 0)))
      (setq Buffer-menu-buffer-list buffer-list)
      (setq Buffer-menu-filter-predicate filter-predicate)
      (list-buffers--refresh buffer-list old-buffer)
      (tabulated-list-print)
      (when tabulated-list-groups
        (setq-local outline-minor-mode-cycle t
                    outline-minor-mode-highlight t)
        (outline-minor-mode 1)))
    buffer))