Update recentf options and add minimal-emacs--cleanup-hook
This commit is contained in:
12
init.el
12
init.el
@@ -211,7 +211,17 @@
|
||||
;; accessed files, making it easier to reopen files you have worked on
|
||||
;; recently.
|
||||
(setq recentf-max-saved-items 300) ; default is 20
|
||||
(setq recentf-auto-cleanup 'mode)
|
||||
(setq recentf-max-menu-items 15)
|
||||
(setq recentf-auto-cleanup 'never)
|
||||
|
||||
(defun minimal-emacs--cleanup-hook ()
|
||||
"Run `recentf-cleanup' if `recentf' is loaded and `recentf-mode' is enabled."
|
||||
(when (and (featurep 'recentf)
|
||||
recentf-mode
|
||||
(fboundp 'recentf-cleanup))
|
||||
(recentf-cleanup)))
|
||||
|
||||
(add-hook 'kill-emacs-hook #'minimal-emacs--cleanup-hook)
|
||||
|
||||
;;; saveplace
|
||||
;; `save-place-mode` enables Emacs to remember the last location within a file
|
||||
|
||||
Reference in New Issue
Block a user