From f9613395553dc759854ff593bd58793c794b5031 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 26 Feb 2021 23:30:26 -0600 Subject: More autoloading stuff --- config.org | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/config.org b/config.org index d3ce1f4..68f1b4e 100644 --- a/config.org +++ b/config.org @@ -340,7 +340,7 @@ Adapted from =midnight-mode=, using suggestions from [[https://old.reddit.com/r/ #+begin_src emacs-lisp :noweb-ref packages (unless (fboundp 'clean-buffer-list) - (autoload #'clean-buffer-list "mightnight")) + (autoload #'clean-buffer-list "midnight")) #+end_src What time I run the clean up is a little tricky for me, since I use @@ -355,8 +355,9 @@ have =clean-buffer-list= run at 8:00 PM. clean-buffer-list-delay-general 5 clean-buffer-list-delay-special (* 7 24 60 60)) - (add-to-list 'clean-buffer-list-kill-buffer-names "*Completions*") - (add-to-list 'clean-buffer-list-kill-buffer-names "*Calendar*") + (with-eval-after-load 'midnight + (add-to-list 'clean-buffer-list-kill-buffer-names "*Completions*") + (add-to-list 'clean-buffer-list-kill-buffer-names "*Calendar*")) #+end_src ** Cursor @@ -1149,15 +1150,17 @@ with that. #+end_src #+begin_src emacs-lisp :noweb-ref modes - (recentf-mode +1) + (with-eval-after-load 'recentf + (recentf-mode +1)) #+end_src I also want to ignore the =no-littering-var-directory= and =no-littering-etc-directory=, since those aren't useful. #+begin_src emacs-lisp :noweb-ref no-littering - (add-to-list 'recentf-exclude no-littering-var-directory) - (add-to-list 'recentf-exclude no-littering-etc-directory) + (with-eval-after-load 'recentf + (add-to-list 'recentf-exclude no-littering-var-directory) + (add-to-list 'recentf-exclude no-littering-etc-directory)) #+end_src *** Save the recentf list periodically @@ -1175,8 +1178,9 @@ I also want to ignore the =no-littering-var-directory= and #+end_src #+begin_src emacs-lisp :noweb-ref hooks - (add-function :after after-focus-change-function - #'maybe-save-recentf) + (with-eval-after-load 'recentf + (add-function :after after-focus-change-function + #'maybe-save-recentf)) #+end_src * Responsiveness @@ -3068,8 +3072,10 @@ the repo using git, /then/ run the bootstrap code. ** Ignore =straight/build/= #+begin_src emacs-lisp :noweb-ref settings - (add-to-list 'recentf-exclude (expand-file-name "straight/build/" - user-emacs-directory)) + (with-eval-after-load 'recentf + (add-to-list 'recentf-exclude + (expand-file-name "straight/build/" + user-emacs-directory))) #+end_src * System integration -- cgit 1.4.1-21-gabe81