Use delay-warning instead of message in warn! macro
This commit is contained in:
parent
0b9ac52d27
commit
f6039eaee3
1 changed files with 5 additions and 8 deletions
|
@ -82,14 +82,11 @@ interactive session."
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defmacro warn! (message &rest args)
|
(defmacro warn! (message &rest args)
|
||||||
"Output a colored warning for the current module in the *Messages* buffer."
|
"Output a colored warning for the current module in the *Messages* buffer."
|
||||||
(let ((msg (format "WARNING: %s" (format message args))))
|
(if (file-in-directory-p load-file-name doom-modules-dir)
|
||||||
(if (file-in-directory-p load-file-name doom-modules-dir)
|
`(cl-destructuring-bind (cat . mod) (doom-module-from-path ,load-file-name)
|
||||||
`(cl-destructuring-bind (cat . mod) (doom-module-from-path load-file-name)
|
(delay-warning (format "%s %s" cat mod) (format ,message ,@args) :warning))
|
||||||
(message
|
`(delay-warning (file-relative-name load-file-name doom-emacs-dir)
|
||||||
"%s"
|
(format ,message ,@args) :warning)))
|
||||||
(propertize (format "%s %s" (list cat mod) ,msg)
|
|
||||||
'face 'warning)))
|
|
||||||
`(message "%s" (propertize ,msg 'face 'warning)))))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defmacro log! (message &rest args)
|
(defmacro log! (message &rest args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue