Refactor initialization of package state
This commit is contained in:
parent
89db59769d
commit
6075e6f143
1 changed files with 7 additions and 8 deletions
|
@ -189,7 +189,7 @@ processed."
|
||||||
(doom-log "Initializing straight.el")
|
(doom-log "Initializing straight.el")
|
||||||
(setq doom-disabled-packages nil
|
(setq doom-disabled-packages nil
|
||||||
doom-packages (doom-package-list))
|
doom-packages (doom-package-list))
|
||||||
(let (loaded)
|
(let (packages)
|
||||||
(dolist (package doom-packages)
|
(dolist (package doom-packages)
|
||||||
(cl-destructuring-bind
|
(cl-destructuring-bind
|
||||||
(name &key recipe disable ignore shadow &allow-other-keys) package
|
(name &key recipe disable ignore shadow &allow-other-keys) package
|
||||||
|
@ -208,13 +208,12 @@ processed."
|
||||||
load-path (delete lib load-path))))))
|
load-path (delete lib load-path))))))
|
||||||
(when recipe
|
(when recipe
|
||||||
(straight-override-recipe (cons name recipe)))
|
(straight-override-recipe (cons name recipe)))
|
||||||
(dolist (pkg (cons name (straight--get-dependencies name)))
|
(appendq! packages (cons name (straight--get-dependencies name)))))))
|
||||||
(unless (memq pkg loaded)
|
(dolist (package (cl-delete-duplicates packages :test #'equal))
|
||||||
(push pkg loaded)
|
(straight-register-package package)
|
||||||
(straight-register-package pkg)
|
(let ((name (symbol-name package)))
|
||||||
(let ((pkg-name (symbol-name pkg)))
|
(add-to-list 'load-path (directory-file-name (straight--build-dir name)))
|
||||||
(add-to-list 'load-path (directory-file-name (straight--build-dir pkg-name)))
|
(straight--load-package-autoloads name))))))
|
||||||
(straight--load-package-autoloads pkg-name)))))))))))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue