From 405f6cdd1ee4d2e56a49ef45f29a9c3ad8a86c06 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 16 Sep 2022 11:51:19 +0200 Subject: [PATCH] fix: load-file-suffixes not being restored This setting (along with load-file-rep-suffixes) is simplified at startup to optimize file IO at startup, but it was supposed to be undone at the end of doom-start (in doom-before-init-hook). Unfortunately, the restoration hook was not reaching their top-level bindings, causing dynamic modules (like vterm-modules.so) to fail to load. --- early-init.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/early-init.el b/early-init.el index cd12e248e..d2ec74091 100644 --- a/early-init.el +++ b/early-init.el @@ -82,18 +82,18 @@ ;; To reduce that burden -- and since Doom doesn't load any dynamic modules ;; -- I remove `.so' from `load-suffixes' and pass the `must-suffix' arg to ;; `load'. See the docs of `load' for details. - (or (let ((load-suffixes '(".elc" ".el"))) + (if (let ((load-suffixes '(".elc" ".el"))) ;; Load the heart of Doom Emacs. - (if (load (expand-file-name "lisp/doom" user-emacs-directory) - 'noerror 'nomessage nil 'must-suffix) - ;; ...and prepare for the rest of the session. - (doom-require (if noninteractive 'doom-cli 'doom-start)))) - ;; Failing that, assume we're loading a non-Doom config and prepare. - (ignore - (setq user-init-file (expand-file-name "early-init" user-emacs-directory) - ;; I make no assumptions about the config we're about to load, so - ;; to limit side-effects, undo any leftover optimizations: - load-prefer-newer t)))) + (load (expand-file-name "lisp/doom" user-emacs-directory) + 'noerror 'nomessage nil 'must-suffix)) + ;; ...and prepare for the rest of the session. + (doom-require (if noninteractive 'doom-cli 'doom-start)) + ;; Failing that, assume we're loading a non-Doom config and prepare. + (setq user-init-file (expand-file-name "early-init" user-emacs-directory) + ;; I make no assumptions about the config we're about to load, so + ;; to limit side-effects, undo any leftover optimizations: + load-prefer-newer t) + nil)) ;; Then continue on to the config/profile we want to load. (load early-init-file 'noerror 'nomessage nil 'must-suffix))