New doom-demote-warnings option for suppress dependency warnings
This commit is contained in:
parent
55b2a6df68
commit
74d8ea2b0f
1 changed files with 15 additions and 4 deletions
|
@ -35,6 +35,11 @@
|
||||||
(strike . 9))
|
(strike . 9))
|
||||||
"List of styles.")
|
"List of styles.")
|
||||||
|
|
||||||
|
(defvar doom-demote-warnings nil
|
||||||
|
"If non-nil, Doom module warnings (the ones that pop up when you're missing a
|
||||||
|
dependency) will only log a message in *Messages* instead of opening a
|
||||||
|
*Warnings* window.")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-ansi-apply (code message &rest args)
|
(defun doom-ansi-apply (code message &rest args)
|
||||||
"Apply the ansi CODE to formatted MESSAGE with ARGS."
|
"Apply the ansi CODE to formatted MESSAGE with ARGS."
|
||||||
|
@ -89,10 +94,16 @@ interactive session."
|
||||||
return t)
|
return t)
|
||||||
`(cl-destructuring-bind (cat . mod)
|
`(cl-destructuring-bind (cat . mod)
|
||||||
(doom-module-from-path ,load-file-name)
|
(doom-module-from-path ,load-file-name)
|
||||||
|
(if doom-demote-warnings
|
||||||
|
(message "WARNING (%s %s) %s" cat mod (format ,message ,@args))
|
||||||
(delay-warning (format "%s %s" cat mod) (format ,message ,@args)
|
(delay-warning (format "%s %s" cat mod) (format ,message ,@args)
|
||||||
:warning))
|
:warning)))
|
||||||
`(delay-warning (file-relative-name load-file-name doom-emacs-dir)
|
`(if doom-demote-warnings
|
||||||
(format ,message ,@args) :warning))))
|
(message "WARNING (%s) %s"
|
||||||
|
(file-relative-name load-file-name doom-emacs-dir)
|
||||||
|
(format ,message ,@args))
|
||||||
|
(delay-warning (file-relative-name load-file-name doom-emacs-dir)
|
||||||
|
(format ,message ,@args) :warning)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defmacro log! (message &rest args)
|
(defmacro log! (message &rest args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue