refactor: change doom-module-list signature
Used to return the hash-table `doom-modules` (if not all-p), but I've changed it to return a list of cons cells (:CATEGORY . MODULE), representing all enabled modules, in the order they were enabled. The purpose of this change is to prepare for a change in the structure of doom-modules, and how Doom stores its module metadata.
This commit is contained in:
parent
775ee2f04a
commit
0c918f3b2d
5 changed files with 26 additions and 24 deletions
|
@ -452,8 +452,7 @@ ones."
|
|||
(doom--read-packages
|
||||
(doom-path doom-core-dir packages-file) all-p 'noerror)
|
||||
(unless core-only-p
|
||||
(let ((private-packages (doom-path doom-user-dir packages-file))
|
||||
(doom-modules (doom-module-list)))
|
||||
(let ((private-packages (doom-path doom-user-dir packages-file)))
|
||||
(if all-p
|
||||
(mapc #'doom--read-packages
|
||||
(doom-files-in doom-modules-dir
|
||||
|
@ -465,10 +464,10 @@ ones."
|
|||
;; overwritten.
|
||||
(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-expand-path (car key) (cdr key) packages-file)
|
||||
for doom--current-module = key
|
||||
for doom--current-flags = (doom-module-get (car key) (cdr key) :flags)
|
||||
(cl-loop for (cat . mod) in (doom-module-list)
|
||||
for path = (doom-module-expand-path cat mod packages-file)
|
||||
for doom--current-module = (cons cat mod)
|
||||
for doom--current-flags = (doom-module-get cat mod :flags)
|
||||
do (doom--read-packages path nil 'noerror)))
|
||||
(doom--read-packages private-packages all-p 'noerror)))
|
||||
(cl-remove-if-not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue