diff options
author | Alan Pearce | 2023-04-02 13:09:40 +0200 |
---|---|---|
committer | Alan Pearce | 2023-04-02 13:09:40 +0200 |
commit | 896f1e6e11ea1c5692e3eeadcdc91dec391b8ad3 (patch) | |
tree | 73dabe6c6b4b21309bf025d912d7f115520d62eb | |
parent | df6737ebdb7926de959038ea96178aebd1a432cb (diff) | |
download | nixfiles-896f1e6e11ea1c5692e3eeadcdc91dec391b8ad3.tar.lz nixfiles-896f1e6e11ea1c5692e3eeadcdc91dec391b8ad3.tar.zst nixfiles-896f1e6e11ea1c5692e3eeadcdc91dec391b8ad3.zip |
emacs: make recentf and format-all quieter
-rw-r--r-- | user/emacs/init.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el index d7aad0fa..530eec90 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -25,6 +25,12 @@ (setq use-package-expand-minimally t)) (setq use-package-always-demand (daemonp)) +(defmacro quietly (&rest body) + `(let ((inhibit-message t)) + ,@body)) +(defun quiet (original-function &rest args) + (quietly (apply original-function args))) + ;;; Customize (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) @@ -214,7 +220,9 @@ With two prefix arguments, write out the day and month name." (use-package recentf :defer 1 :custom (recentf-auto-cleanup 1800) - :config (recentf-mode +1)) + :config (progn + (quietly (recentf-mode +1)) + (advice-add 'recentf-cleanup :around #'quiet))) (use-package savehist :init (savehist-mode +1) @@ -1085,6 +1093,9 @@ _p_rev _u_pper _=_: upper/lower _r_esolve toml-mode-hook typescript-mode-hook)) :gfhook #'format-all-ensure-formatter + :init (progn + (advice-add 'format-all-ensure-formatter + :around #'quiet)) :config (progn (setq format-all-show-errors 'never))) |