Variable: recentf-mode

recentf-mode is a customizable variable defined in recentf.el.gz.

Value

nil

Documentation

Non-nil if Recentf mode is enabled.

See the recentf-mode(var)/recentf-mode(fun) command for a description of this minor mode. Setting this variable directly does not take effect; either customize it (see the info node (emacs)Easy Customization) or call the function recentf-mode(var)/recentf-mode(fun).

View in manual

Probably introduced at or before Emacs version 22.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/recentf.el.gz
;;;###autoload
(define-minor-mode recentf-mode
  "Toggle keeping track of opened files (Recentf mode).
This mode maintains a list of recently opened files and makes it
easy to visit them.  The recent files list is automatically saved
across Emacs sessions.

You can use `recentf-open' or `recentf-open-files' to visit
files.

When Recentf mode is enabled, a \"Open Recent\" submenu is
displayed in the \"File\" menu, containing a list of files that
were operated on recently, in the most-recently-used order.

By default, only operations like opening a file, writing a buffer
to a file, and killing a buffer is counted as \"operating\" on
the file.  If instead you want to prioritize files that appear in
buffers you switch to a lot, you can say something like the following:

  (add-hook \\='buffer-list-update-hook #\\='recentf-track-opened-file)"
  :global t
  :group 'recentf
  :keymap recentf-mode-map
  (unless (and recentf-mode (recentf-enabled-p))
    (if recentf-mode
        (progn
          (recentf-load-list)
          (recentf-show-menu))
      (recentf-hide-menu)
      (recentf-save-list))
    (recentf-auto-cleanup)
    (let ((hook-setup (if recentf-mode 'add-hook 'remove-hook)))
      (dolist (hook recentf-used-hooks)
        (apply hook-setup hook)))))