mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-10 08:41:32 -07:00
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. |
||
|---|---|---|
| .. | ||
| cli | ||
| lib | ||
| modules | ||
| .doommodule | ||
| demos.org | ||
| doom-cli.el | ||
| doom-compat.el | ||
| doom-editor.el | ||
| doom-elpaca.el | ||
| doom-keybinds.el | ||
| doom-lib.el | ||
| doom-projects.el | ||
| doom-start.el | ||
| doom-straight.el | ||
| doom-ui.el | ||
| doom.el | ||
| init.el | ||
| packages.el | ||