Function: Buffer-menu-buffer

Buffer-menu-buffer is a byte-compiled function defined in buff-menu.el.gz.

Signature

(Buffer-menu-buffer &optional ERROR-IF-NON-EXISTENT-P)

Documentation

Return the buffer described by the current Buffer Menu line.

If there is no buffer here, return nil if ERROR-IF-NON-EXISTENT-P is nil or omitted, and signal an error otherwise.

Source Code

;; Defined in /usr/src/emacs/lisp/buff-menu.el.gz
(defun Buffer-menu-buffer (&optional error-if-non-existent-p)
  "Return the buffer described by the current Buffer Menu line.
If there is no buffer here, return nil if ERROR-IF-NON-EXISTENT-P
is nil or omitted, and signal an error otherwise."
  (let ((buffer (tabulated-list-get-id)))
    (cond ((null buffer)
	   (if error-if-non-existent-p
	       (error "No buffer on this line")))
	  ((not (buffer-live-p buffer))
	   (if error-if-non-existent-p
	       (error "This buffer has been killed")))
	  (t buffer))))