fix: ensure module state is in scope for modulep!
Otherwise, doom-module-from-path (and modulep!) would fail to detect the module they're in, or at least, modulep! would incorrectly return nil, even for enabled modules. This issue is what would've caused the package list or the doctor to include/consider packages in disabled modules or behind disabled flags.
This commit is contained in:
parent
ce0e3a04b6
commit
45a66cda60
3 changed files with 14 additions and 7 deletions
|
@ -463,9 +463,11 @@ ones."
|
|||
(let (doom-packages)
|
||||
(doom--read-packages private-packages nil 'noerror))
|
||||
(cl-loop for key being the hash-keys of doom-modules
|
||||
for path = (doom-module-path (car key) (cdr key) packages-file)
|
||||
for plist = (get (car key) (cdr key))
|
||||
for doom--current-flags = (plist-get plist :flags)
|
||||
for doom--current-module = key
|
||||
do (doom--read-packages path nil 'noerror)))
|
||||
for file = (doom-path (plist-get plist :path) packages-file)
|
||||
do (doom--read-packages file nil 'noerror)))
|
||||
(doom--read-packages private-packages all-p 'noerror)))
|
||||
(cl-remove-if-not
|
||||
(if core-only-p
|
||||
|
@ -555,13 +557,14 @@ elsewhere."
|
|||
`(let* ((name ',name)
|
||||
(plist (cdr (assq name doom-packages))))
|
||||
;; Record what module this declaration was found in
|
||||
(let ((module-list (plist-get plist :modules))
|
||||
(module ',(doom-module-from-path)))
|
||||
(let* ((dir (dir!))
|
||||
(module-list (plist-get plist :modules))
|
||||
(module (doom-module-from-path dir)))
|
||||
(unless (member module module-list)
|
||||
(cl-callf plist-put plist :modules
|
||||
(append module-list
|
||||
(list module)
|
||||
(when (file-in-directory-p ,(dir!) doom-user-dir)
|
||||
(when (file-in-directory-p dir doom-user-dir)
|
||||
'((:user . modules)))
|
||||
nil))))
|
||||
;; Merge given plist with pre-existing one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue