Report missing module in require! macro
This commit is contained in:
parent
ff717e5c2f
commit
1140af7807
1 changed files with 11 additions and 7 deletions
|
@ -408,13 +408,17 @@ The module is only loaded once. If RELOAD-P is non-nil, load it again."
|
||||||
(when (or reload-p (not loaded-p))
|
(when (or reload-p (not loaded-p))
|
||||||
(unless loaded-p
|
(unless loaded-p
|
||||||
(doom-module-enable module submodule flags))
|
(doom-module-enable module submodule flags))
|
||||||
|
(let ((module-path (doom-module-path module submodule)))
|
||||||
|
(if (file-directory-p module-path)
|
||||||
`(condition-case-unless-debug ex
|
`(condition-case-unless-debug ex
|
||||||
(load! config ,(doom-module-path module submodule) t)
|
(load! config ,module-path t)
|
||||||
('error
|
('error
|
||||||
(lwarn 'doom-modules :error
|
(lwarn 'doom-modules :error
|
||||||
"%s in '%s %s' -> %s"
|
"%s in '%s %s' -> %s"
|
||||||
(car ex) ,module ',submodule
|
(car ex) ,module ',submodule
|
||||||
(error-message-string ex)))))))
|
(error-message-string ex))))
|
||||||
|
(lwarn 'doom-modules :warning "Couldn't find module '%s %s'"
|
||||||
|
module submodule))))))
|
||||||
|
|
||||||
(defmacro featurep! (module &optional submodule flag)
|
(defmacro featurep! (module &optional submodule flag)
|
||||||
"A convenience macro wrapper for `doom-module-loaded-p'. It is evaluated at
|
"A convenience macro wrapper for `doom-module-loaded-p'. It is evaluated at
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue