Function: recentf-make-menu-items

recentf-make-menu-items is a byte-compiled function defined in recentf.el.gz.

Signature

(recentf-make-menu-items &optional MENU)

Documentation

Make menu items from the recent list.

This is a menu filter function which ignores the MENU argument.

Source Code

;; Defined in /usr/src/emacs/lisp/recentf.el.gz
(defun recentf-make-menu-items (&optional _menu)
  "Make menu items from the recent list.
This is a menu filter function which ignores the MENU argument."
  (setq recentf-menu-filter-commands nil)
  (let* ((recentf-menu-shortcuts 0)
         (file-items
          (condition-case err
              (mapcar #'recentf-make-menu-item
                      (recentf-apply-menu-filter
                       recentf-menu-filter
                       (recentf-menu-elements recentf-max-menu-items)))
            (error
             (message "recentf update menu failed: %s"
                      (error-message-string err))))))
    (append
     (or file-items
         '(["No files" t
            :help "No recent file to open"
            :active nil]))
     (if recentf-menu-open-all-flag
         '(["All..." recentf-open-files
            :help "Open recent files through a dialog"
            :active t])
       (and (< recentf-max-menu-items (length recentf-list))
            '(["More..." recentf-open-more-files
               :help "Open files not in the menu through a dialog"
               :active t])))
     (and recentf-menu-filter-commands '("---"))
     recentf-menu-filter-commands
     (and recentf-menu-items-for-commands '("---"))
     recentf-menu-items-for-commands)))