Variable: recentf-mode-hook

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

Value

nil

Documentation

Hook run after entering or leaving recentf-mode(var)/recentf-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/recentf.el.gz
;;;###autoload
(define-minor-mode recentf-mode
  "Toggle \"Open Recent\" menu (Recentf mode).

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)))))