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
|
||||
(defmacro warn! (message &rest args)
|
||||
"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)
|
||||
`(cl-destructuring-bind (cat . mod) (doom-module-from-path load-file-name)
|
||||
(message
|
||||
"%s"
|
||||
(propertize (format "%s %s" (list cat mod) ,msg)
|
||||
'face 'warning)))
|
||||
`(message "%s" (propertize ,msg 'face 'warning)))))
|
||||
`(cl-destructuring-bind (cat . mod) (doom-module-from-path ,load-file-name)
|
||||
(delay-warning (format "%s %s" cat mod) (format ,message ,@args) :warning))
|
||||
`(delay-warning (file-relative-name load-file-name doom-emacs-dir)
|
||||
(format ,message ,@args) :warning)))
|
||||
|
||||
;;;###autoload
|
||||
(defmacro log! (message &rest args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue