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.
This commit is contained in:
Henrik Lissner 2022-09-16 11:51:19 +02:00
parent 3f866983e5
commit 405f6cdd1e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -82,18 +82,18 @@
;; To reduce that burden -- and since Doom doesn't load any dynamic modules ;; 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 ;; -- I remove `.so' from `load-suffixes' and pass the `must-suffix' arg to
;; `load'. See the docs of `load' for details. ;; `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. ;; Load the heart of Doom Emacs.
(if (load (expand-file-name "lisp/doom" user-emacs-directory) (load (expand-file-name "lisp/doom" user-emacs-directory)
'noerror 'nomessage nil 'must-suffix) 'noerror 'nomessage nil 'must-suffix))
;; ...and prepare for the rest of the session. ;; ...and prepare for the rest of the session.
(doom-require (if noninteractive 'doom-cli 'doom-start)))) (doom-require (if noninteractive 'doom-cli 'doom-start))
;; Failing that, assume we're loading a non-Doom config and prepare. ;; 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)
(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
;; I make no assumptions about the config we're about to load, so ;; to limit side-effects, undo any leftover optimizations:
;; to limit side-effects, undo any leftover optimizations: load-prefer-newer t)
load-prefer-newer t)))) nil))
;; Then continue on to the config/profile we want to load. ;; Then continue on to the config/profile we want to load.
(load early-init-file 'noerror 'nomessage nil 'must-suffix)) (load early-init-file 'noerror 'nomessage nil 'must-suffix))