Function: ido-read-buffer

ido-read-buffer is an autoloaded and byte-compiled function defined in ido.el.gz.

Signature

(ido-read-buffer PROMPT &optional DEFAULT REQUIRE-MATCH PREDICATE)

Documentation

Ido replacement for the built-in read-buffer.

Return the name of a buffer selected. PROMPT is the prompt to give to the user. DEFAULT if given is the default buffer to be selected, which will go to the front of the list. If REQUIRE-MATCH is non-nil, an existing buffer must be selected. Optional arg PREDICATE if non-nil is a function limiting the buffers that can be considered.

Source Code

;; Defined in /usr/src/emacs/lisp/ido.el.gz
;;;###autoload
(defun ido-read-buffer (prompt &optional default require-match predicate)
  "Ido replacement for the built-in `read-buffer'.
Return the name of a buffer selected.
PROMPT is the prompt to give to the user.  DEFAULT if given is the default
buffer to be selected, which will go to the front of the list.
If REQUIRE-MATCH is non-nil, an existing buffer must be selected.
Optional arg PREDICATE if non-nil is a function limiting the
buffers that can be considered."
  (let* ((ido-current-directory nil)
	 (ido-directory-nonreadable nil)
	 (ido-directory-too-big nil)
         (ido-predicate predicate)
	 (ido-context-switch-command 'ignore)
	 (buf (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match)))
    (if (eq ido-exit 'fallback)
	(let ((read-buffer-function nil))
	  (run-hook-with-args 'ido-before-fallback-functions 'read-buffer)
	  (read-buffer prompt default require-match predicate))
      buf)))