diff --git a/README.md b/README.md index 36c3195..ef1800c 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,7 @@ The recentf, savehist, saveplace, and auto-revert built-in packages are already ;; accessed files, making it easier to reopen files you have worked on ;; recently. (add-hook 'after-init-hook #'recentf-mode) +(add-hook 'kill-emacs-hook #'recentf-cleanup) ;; savehist is an Emacs feature that preserves the minibuffer history between ;; sessions. It saves the history of inputs in the minibuffer, such as commands, diff --git a/init.el b/init.el index cb5ea2f..1df8b93 100644 --- a/init.el +++ b/init.el @@ -208,7 +208,7 @@ ;; recently. (setq recentf-max-saved-items 300) ; default is 20 (setq recentf-max-menu-items 15) -(setq recentf-auto-cleanup (if (daemonp) 300 'mode)) +(setq recentf-auto-cleanup (if (daemonp) 300 'never)) ;; Update recentf-exclude (setq recentf-exclude (list "^/\\(?:ssh\\|su\\|sudo\\)?:"))