Minor refactor/reformatting of doom-initialize
- No need to use after! (it has a little magic associated with it that are meaningless this early in the startup process), so we use with-eval-after-load instead. (And I've been itching for an excuse to use doom-rpartial)
This commit is contained in:
parent
a10693886e
commit
08ba22c653
1 changed files with 9 additions and 5 deletions
14
core/core.el
14
core/core.el
|
@ -519,20 +519,24 @@ to least)."
|
|||
(if (and core-autoloads-p (not force-p))
|
||||
;; In case we want to use package.el or straight via M-x
|
||||
(progn
|
||||
(after! (:or package straight)
|
||||
(with-eval-after-load 'package
|
||||
(require 'core-packages))
|
||||
(after! straight
|
||||
(with-eval-after-load 'straight
|
||||
(require 'core-packages)
|
||||
(doom-initialize-packages)))
|
||||
|
||||
;; Eagerly load these libraries because this module may be loaded in a session
|
||||
;; that hasn't been fully initialized (where autoloads files haven't been
|
||||
;; generated or `load-path' populated).
|
||||
(let ((default-directory doom-core-dir))
|
||||
(dolist (file (file-expand-wildcards "autoload/*.el"))
|
||||
(load file t t)))
|
||||
(mapc (doom-rpartial #'load 'noerror 'nomessage)
|
||||
(file-expand-wildcards "autoload/*.el")))
|
||||
|
||||
;; Create all our core directories to quell file errors
|
||||
(dolist (dir (list doom-local-dir doom-etc-dir doom-cache-dir doom-elpa-dir))
|
||||
(dolist (dir (list doom-local-dir
|
||||
doom-etc-dir
|
||||
doom-cache-dir
|
||||
doom-elpa-dir))
|
||||
(unless (file-directory-p dir)
|
||||
(make-directory dir 'parents)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue