diff --git a/bin/doom-doctor b/bin/doom-doctor index 9788f29e9..0d957f590 100755 --- a/bin/doom-doctor +++ b/bin/doom-doctor @@ -297,9 +297,7 @@ (when (bound-and-true-p doom-modules) (section! "test-modules") (let ((indent 4)) - (defun --quiet-require (orig-fn &rest args) - (quiet! (apply orig-fn args))) - (advice-add #'require :around #'--quiet-require) + (advice-add #'require :around #'doom*shut-up) (maphash (lambda (key plist) (condition-case ex diff --git a/core/core-lib.el b/core/core-lib.el index 131bd1569..22e0d79f5 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -97,6 +97,10 @@ compilation." (save-silently t)) ,@forms)))) +(defun doom*shut-up (orig-fn &rest args) + "Generic advisor for silencing noisy functions." + (quiet! (apply orig-fn args))) + (defvar doom--transient-counter 0) (defmacro add-transient-hook! (hook &rest forms) "Attaches transient forms to a HOOK. diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index 842e42e97..a0bf468c1 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -51,6 +51,7 @@ MODES should be one major-mode symbol or a list of them." (def-package! company-statistics :hook (company-mode . company-statistics-mode) + :init (advice-add #'company-statistics-mode :around #'doom*shut-up) :config (setq company-statistics-file (concat doom-cache-dir "company-stats-cache.el"))) diff --git a/modules/lang/sh/config.el b/modules/lang/sh/config.el index 79ed15e44..d100a8c86 100644 --- a/modules/lang/sh/config.el +++ b/modules/lang/sh/config.el @@ -28,10 +28,8 @@ (nil "^\\s-*\\([[:alpha:]_-][[:alnum:]_-]*\\)\\s-*()" 1)))) sh-imenu-generic-expression) - (defun +sh*silence-messages (orig-fn &rest args) - "`sh-set-shell' is chatty about it setting up indentation rules. Shut up." - (quiet! (apply orig-fn args))) - (advice-add #'sh-set-shell :around #'+sh*silence-messages) + ;; `sh-set-shell' is chatty about setting up indentation rules + (advice-add #'sh-set-shell :around #'doom*shut-up) ;; 1. Fontifies variables in double quotes ;; 2. Fontify command substitution in double quotes