Function: msb--most-recently-used-menu

msb--most-recently-used-menu is a byte-compiled function defined in msb.el.gz.

Signature

(msb--most-recently-used-menu MAX-BUFFER-NAME-LENGTH)

Documentation

Return a list for the most recently used buffers.

It takes the form ((TITLE . BUFFER-LIST)...).

Source Code

;; Defined in /usr/src/emacs/lisp/msb.el.gz
(defun msb--most-recently-used-menu (max-buffer-name-length)
  "Return a list for the most recently used buffers.
It takes the form ((TITLE . BUFFER-LIST)...)."
  (when (and (numberp msb-display-most-recently-used)
             (> msb-display-most-recently-used 0))
    (let* ((buffers (cdr (buffer-list)))
	   (most-recently-used
	    (cl-loop with n = 0
                     for buffer in buffers
                     if (with-current-buffer buffer
                          (and (not (msb-invisible-buffer-p))
                               (not (eq major-mode 'dired-mode))))
                     collect (with-current-buffer buffer
                               (cons (funcall msb-item-handling-function
                                              buffer
                                              max-buffer-name-length)
                                     buffer))
                     and do (incf n)
                     until (>= n msb-display-most-recently-used))))
      (cons (if (stringp msb-most-recently-used-title)
		(format msb-most-recently-used-title
			(length most-recently-used))
	      (signal 'wrong-type-argument (list msb-most-recently-used-title)))
	    most-recently-used))))