Update recentf options

This commit is contained in:
James Cherti
2025-02-02 22:25:04 -05:00
parent cdef3035a3
commit 014acf2613

View File

@@ -212,15 +212,13 @@
;; recently. ;; recently.
(setq recentf-max-saved-items 300) ; default is 20 (setq recentf-max-saved-items 300) ; default is 20
(setq recentf-max-menu-items 15) (setq recentf-max-menu-items 15)
(setq recentf-auto-cleanup 'never) (setq recentf-auto-cleanup (if (daemonp) 300 'never))
(defun minimal-emacs--cleanup-hook () (defun minimal-emacs--cleanup-hook ()
"Run `recentf-cleanup' if `recentf' is loaded and `recentf-mode' is enabled." "Run `recentf-cleanup' if `recentf' is loaded and `recentf-mode' is enabled."
(when (and (featurep 'recentf) (when (and (featurep 'recentf)
recentf-mode recentf-mode
(fboundp 'recentf-cleanup)) (fboundp 'recentf-cleanup))
(recentf-cleanup))) (recentf-cleanup)))
(add-hook 'kill-emacs-hook #'minimal-emacs--cleanup-hook) (add-hook 'kill-emacs-hook #'minimal-emacs--cleanup-hook)
;;; saveplace ;;; saveplace