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
|
;;;###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."
|
||||||
(if (file-in-directory-p load-file-name doom-modules-dir)
|
(let ((load-file-name (or load-file-name byte-compile-current-file)))
|
||||||
`(cl-destructuring-bind (cat . mod) (doom-module-from-path ,load-file-name)
|
(if (file-in-directory-p load-file-name doom-modules-dir)
|
||||||
(delay-warning (format "%s %s" cat mod) (format ,message ,@args) :warning))
|
`(cl-destructuring-bind (cat . mod) (doom-module-from-path ,load-file-name)
|
||||||
`(delay-warning (file-relative-name load-file-name doom-emacs-dir)
|
(delay-warning (format "%s %s" cat mod) (format ,message ,@args) :warning))
|
||||||
(format ,message ,@args) :warning)))
|
`(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