doomemacs/lisp
Marien Zwart a6c57fd4fd fix: save after recentf-cleanup on exit
Doom adds `recentf-cleanup` to `kill-emacs-hook`, but that function only
cleans up `recentf-list` without saving it to disk: saving is handled by
`recentf-save-list`. `recentf-mode` adds `recentf-save-list` to
`kill-emacs-hook` as well... but it only adds that hook when
`recentf-mode` is enabled, which means `recentf-save-list` ends up
before `recentf-cleanup` on `kill-emacs-hook`, rendering the cleanup
ineffective.

This is normally barely noticable, but with many paths on (slow) network
filesystems on `recentf-list` the cleanup can get slow enough to be
annoying.

Fix it by passing a priority to `add-hook`.

This leaves an ineffective cleanup call if we exit Emacs with
recentf-mode disabled, but that should normally only happen if we exit
Emacs without opening a file (`doom-first-file-hook` enables
recentf-mode). If that's an issue, we could add a function to
`recentf-mode-hook` which in turn adds to `emacs-term-hook`, but that
seems too complicated for little gain.
2026-03-03 18:26:05 -05:00
..
cli fix(cli): doom emacs: use --init-directory if available 2026-03-03 06:34:45 -05:00
lib nit: revise TODO/FIXME/HACK/REVIEW/etc in comments 2026-03-02 19:45:09 -05:00
modules module: move :core to :doom 2025-09-18 22:48:07 -04:00
.doommodule feat: add .doommodule files 2024-09-14 20:47:39 -04:00
demos.org docs: fix package! examples 2026-02-11 17:47:37 -05:00
doom-cli.el nit: revise TODO/FIXME/HACK/REVIEW/etc in comments 2026-03-02 19:45:09 -05:00
doom-compat.el refactor(lib): move fringe/fontset autodefs to doom-compat 2025-09-17 01:23:45 -04:00
doom-editor.el fix: save after recentf-cleanup on exit 2026-03-03 18:26:05 -05:00
doom-elpaca.el refactor!: restructure Doom core 2024-11-03 01:52:28 -05:00
doom-keybinds.el refactor: deprecate appendq!, prependq!, & delq! macros 2025-03-25 14:16:56 -04:00
doom-lib.el nit: revise TODO/FIXME/HACK/REVIEW/etc in comments 2026-03-02 19:45:09 -05:00
doom-projects.el nit: revise TODO/FIXME/HACK/REVIEW/etc in comments 2026-03-02 19:45:09 -05:00
doom-start.el nit: revise TODO/FIXME/HACK/REVIEW/etc in comments 2026-03-02 19:45:09 -05:00
doom-straight.el nit: revise TODO/FIXME/HACK/REVIEW/etc in comments 2026-03-02 19:45:09 -05:00
doom-ui.el nit: revise TODO/FIXME/HACK/REVIEW/etc in comments 2026-03-02 19:45:09 -05:00
doom.el nit: revise TODO/FIXME/HACK/REVIEW/etc in comments 2026-03-02 19:45:09 -05:00
init.el dev: replace .doomrc w/ .doom.el 2025-06-30 15:23:27 +02:00
packages.el bump: :doom 2026-03-02 01:39:49 -05:00