Function: ido-make-buffer-list

ido-make-buffer-list is a byte-compiled function defined in ido.el.gz.

Signature

(ido-make-buffer-list DEFAULT)

Documentation

Return the current list of buffers.

Currently visible buffers are put at the end of the list. The hook ido-make-buffer-list-hook is run after the list has been created to allow the user to further modify the order of the buffer names in this list. If DEFAULT is non-nil, and corresponds to an existing buffer, it is put to the start of the list.

Source Code

;; Defined in /usr/src/emacs/lisp/ido.el.gz
(defun ido-make-buffer-list (default)
  "Return the current list of buffers.
Currently visible buffers are put at the end of the list.
The hook `ido-make-buffer-list-hook' is run after the list has been
created to allow the user to further modify the order of the buffer names
in this list.  If DEFAULT is non-nil, and corresponds to an existing buffer,
it is put to the start of the list."
  (let* ((ido-current-buffers (ido-get-buffers-in-frames 'current))
	 (ido-temp-list (ido-make-buffer-list-1 (selected-frame) ido-current-buffers)))
    (if ido-temp-list
	(nconc ido-temp-list ido-current-buffers)
      (setq ido-temp-list ido-current-buffers))
    (if ido-predicate
        (setq ido-temp-list (seq-filter
                             (lambda (name)
                               (funcall ido-predicate (cons name (get-buffer name))))
                             ido-temp-list)))
    (if default
	(setq ido-temp-list
	      (cons default (delete default ido-temp-list))))
    (if (bound-and-true-p ido-enable-virtual-buffers)
	(ido-add-virtual-buffers-to-list))
    (run-hooks 'ido-make-buffer-list-hook)
    ido-temp-list))