Function: ibuffer-sort-bufferlist

ibuffer-sort-bufferlist is a byte-compiled function defined in ibuffer.el.gz.

Signature

(ibuffer-sort-bufferlist BMARKLIST)

Source Code

;; Defined in /usr/src/emacs/lisp/ibuffer.el.gz
(defun ibuffer-sort-bufferlist (bmarklist)
  (unless ibuffer-sorting-functions-alist
    ;; make sure the sorting functions are loaded
    (require 'ibuf-ext))
  (let* ((sortdat (assq ibuffer-sorting-mode
			ibuffer-sorting-functions-alist))
	 (func (nth 2 sortdat)))
    (let ((result
	   ;; actually sort the buffers
	   (if (and sortdat func)
	       (sort bmarklist func)
	     bmarklist)))
      ;; perhaps reverse the sorted buffer list
      (if ibuffer-sorting-reversep
	  (nreverse result)
	result))))