refactor: enable module whether or not it exists
The doom-modules table should reflect the user's intentions, not the actual state of its modules (e.g. by omitting modules that couldn't be found at activation time).
This commit is contained in:
parent
a9e0156416
commit
e411762e8c
1 changed files with 8 additions and 8 deletions
|
@ -274,11 +274,8 @@ those directories."
|
||||||
mplist)
|
mplist)
|
||||||
(push (car key) mplist))
|
(push (car key) mplist))
|
||||||
(throw 'doom-modules t))))
|
(throw 'doom-modules t))))
|
||||||
(let ((path (doom-module-locate-path category module)))
|
(push (funcall fn category module :flags (if (listp m) (cdr m)))
|
||||||
(push (funcall fn category module
|
results))))))
|
||||||
:flags (if (listp m) (cdr m))
|
|
||||||
:path (if (stringp path) (file-truename path)))
|
|
||||||
results)))))))
|
|
||||||
(when noninteractive
|
(when noninteractive
|
||||||
(setq doom-inhibit-module-warnings t))
|
(setq doom-inhibit-module-warnings t))
|
||||||
(nreverse results)))
|
(nreverse results)))
|
||||||
|
@ -432,9 +429,12 @@ to least)."
|
||||||
`(when noninteractive
|
`(when noninteractive
|
||||||
(doom-module-mplist-map
|
(doom-module-mplist-map
|
||||||
(lambda (category module &rest plist)
|
(lambda (category module &rest plist)
|
||||||
(if (plist-member plist :path)
|
(let ((path (doom-module-locate-path category module)))
|
||||||
(apply #'doom-module-set category module plist)
|
(unless path
|
||||||
(message "WARNING Couldn't find the %s %s module" category module)))
|
(print! (warn "Failed to locate a '%s %s' module") category module))
|
||||||
|
(apply #'doom-module-set category module
|
||||||
|
:path path
|
||||||
|
plist)))
|
||||||
,@(if (keywordp (car modules))
|
,@(if (keywordp (car modules))
|
||||||
(list (list 'quote modules))
|
(list (list 'quote modules))
|
||||||
modules))
|
modules))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue