From c5735b3182e28e081513f8a0bd57f2df073faeda Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 2 Jan 2021 17:36:49 -0600 Subject: Whitespace --- config.org | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/config.org b/config.org index add83bf..ab7ddea 100644 --- a/config.org +++ b/config.org @@ -735,21 +735,26 @@ from [[https://www.reddit.com/r/emacs/comments/km9by4/weekly_tipstricketc_thread *** Recent files #+BEGIN_SRC emacs-lisp -(require 'recentf) + (require 'recentf) -(cuss recentf-max-menu-items 100 - "The maximum number of items in the recentf menu.") -(cuss recentf-max-saved-items nil - "Don't limit the number of recent files.") + (cuss recentf-max-menu-items 100 + "The maximum number of items in the recentf menu.") + (cuss recentf-max-saved-items nil + "Don't limit the number of recent files.") -(with-eval-after-load 'no-littering - (add-to-list 'recentf-exclude no-littering-var-directory) - (add-to-list 'recentf-exclude no-littering-etc-directory)) + (with-eval-after-load 'no-littering + (add-to-list 'recentf-exclude no-littering-var-directory) + (add-to-list 'recentf-exclude no-littering-etc-directory)) + + (recentf-mode +1) -(recentf-mode +1) + ;; save recentf list when focusing away + (defun acdw/save-recentf-when-nonfocused () + "Save `recentf-file' when out of focus." + (acdw/when-unfocused #'recentf-save-list)) -;; save the recentf-list every 5 minutes -(run-at-time nil (* 5 60) 'recentf-save-list) + (add-function :after after-focus-change-function + #'acdw/save-recentf-when-nonfocused) #+END_SRC ** Undo -- cgit 1.4.1-21-gabe81