Various enhancements in garbage collection, file-name-handler-alist, and recentf

This commit is contained in:
James Cherti
2025-02-18 15:58:05 -05:00
parent e16fe62722
commit 1293be787c
2 changed files with 16 additions and 21 deletions

10
init.el
View File

@@ -208,15 +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 '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)
(setq recentf-auto-cleanup (if (daemonp) 300 'mode))
;; Update recentf-exclude
(setq recentf-exclude (list "^/\\(?:ssh\\|su\\|sudo\\)?:"))