From 08ba22c6538592fc9b73816667c3f6e9fa40ab79 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 26 Jul 2019 20:07:48 +0200 Subject: [PATCH] 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) --- core/core.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/core/core.el b/core/core.el index be8819787..c872b64ea 100644 --- a/core/core.el +++ b/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)))