Fix empty load-file-name in warn! macro during byte-compilation
This commit is contained in:
parent
0f404a513a
commit
ae52b2ff60
1 changed files with 6 additions and 5 deletions
|
@ -83,11 +83,12 @@ interactive session."
|
|||
;;;###autoload
|
||||
(defmacro warn! (message &rest args)
|
||||
"Output a colored warning for the current module in the *Messages* buffer."
|
||||
(if (file-in-directory-p load-file-name doom-modules-dir)
|
||||
`(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)))
|
||||
(let ((load-file-name (or load-file-name byte-compile-current-file)))
|
||||
(if (file-in-directory-p load-file-name doom-modules-dir)
|
||||
`(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