From b7b66e620203c7068b9c45388eca9a1ebec8d13f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 20 Sep 2022 12:57:23 +0200 Subject: [PATCH] fix: $DOOMDIR loading twice and too early An unintended change snuck into 2c14eff. The :core and :user virtual modules are no longer stripped from the module list before iterating through (and loading) them. This meant that Doom would load these two like regular modules (and first, since these two are always at the start of the list). This is harmless for :core, because it has no init.el or config.el, but :user does! This means $DOOMDIR/{init,config}.el would be loaded twice (once before all other modules and again afterwards), causing load order issues (like #6818). Fix: #6818 Amend: 2c14eff7f145 --- lisp/doom-profiles.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/doom-profiles.el b/lisp/doom-profiles.el index e4c79d650..18ab497cf 100644 --- a/lisp/doom-profiles.el +++ b/lisp/doom-profiles.el @@ -386,12 +386,11 @@ Defaults to the profile at `doom-profile-default'." branch ,(if (zerop (car branch)) (cdr branch)))))))) (defun doom-profile--generate-load-modules () - (let ((module-list (doom-module-list))) + (let ((module-list (cddr (doom-module-list)))) ;; FIX: Same as above (see `doom-profile--generate-init-vars'). `((unless doom-init-time (set 'doom-disabled-packages ',doom-disabled-packages) (set 'doom-modules ',doom-modules) - (defvar doom-modules-list ',(cddr module-list)) ;; Cache module state and flags in symbol plists for quick lookup by ;; `modulep!' later. ,@(cl-loop for (category . modules) in (seq-group-by #'car (doom-module-list))