Refactor doom init process

- Refactors doom-initialize
- Moves doom-initialize-modules call to init.el, to more easily isolate
  it during unit testing.
This commit is contained in:
Henrik Lissner 2019-08-23 20:33:30 -04:00
parent 465122320d
commit 8ac1e1a781
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
7 changed files with 53 additions and 48 deletions

View file

@ -93,7 +93,9 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files."
;; But first we must be sure that Doom and your private config have been
;; fully loaded. Which usually aren't so in an noninteractive session.
(let (noninteractive)
(doom-initialize 'force-p))
(doom-initialize 'force)
(doom-initialize-core)
(doom-initialize-modules 'force))
;;
(unless target-dirs
@ -102,9 +104,10 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files."
(appendq! target-dirs
(list doom-core-dir)
(nreverse
(cl-remove-if-not (lambda (path) (file-in-directory-p path doom-emacs-dir))
;; Omit `doom-private-dir', which is always first
(cdr (doom-module-load-path))))))
(cl-remove-if-not
(lambda (path) (file-in-directory-p path doom-emacs-dir))
;; Omit `doom-private-dir', which is always first
(cdr (doom-module-load-path))))))
;; Assemble el files we want to compile; taking into account that MODULES
;; may be a list of MODULE/SUBMODULE strings from the command line.