mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Fix empty load-file-name in warn! macro during byte-compilation
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user