Function: ibuffer-current-state-list

ibuffer-current-state-list is a byte-compiled function defined in ibuffer.el.gz.

Signature

(ibuffer-current-state-list &optional POS)

Documentation

Return a list like (BUF . MARK) of all buffers in an ibuffer.

If POS is non-nil, return a list like (BUF MARK POINT), where POINT is the value of point at the beginning of the line for that buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/ibuffer.el.gz
(defun ibuffer-current-state-list (&optional pos)
  "Return a list like (BUF . MARK) of all buffers in an ibuffer.
If POS is non-nil, return a list like (BUF MARK POINT), where POINT is
the value of point at the beginning of the line for that buffer."
  (let ((ibuffer-current-state-list-tmp '()))
    ;; ah, if only we had closures.  I bet this will mysteriously
    ;; break later.  Don't blame me.
    (if pos
	(ibuffer-map-lines-nomodify
	 (lambda (buf mark)
	   (when (buffer-live-p buf)
	     (push (list buf mark (point)) ibuffer-current-state-list-tmp))))
      (ibuffer-map-lines-nomodify
       (lambda (buf mark)
	 (when (buffer-live-p buf)
	   (push (cons buf mark) ibuffer-current-state-list-tmp)))))
    (nreverse ibuffer-current-state-list-tmp)))