fix: load compiled module files, if available

Not that they'll be compiled anytime soon, but just in case.
This commit is contained in:
Henrik Lissner 2022-09-20 17:32:00 +02:00
parent 31be70b565
commit 028de9483f
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -406,14 +406,16 @@ Defaults to the profile at `doom-profile-default'."
(doom-load ,(doom-path doom-core-dir "doom-projects"))
(doom-load ,(doom-path doom-core-dir "doom-editor"))
,@(cl-loop for (cat . mod) in module-list
if (doom-module-locate-path cat mod (concat doom-module-init-file ".el"))
for dir = (doom-module-locate-path cat mod)
if (locate-file-internal doom-module-init-file (list dir) load-suffixes)
collect `(let ((doom--current-module '(,cat . ,mod))
(doom--current-flags ',(doom-module-get cat mod :flags)))
(doom-load ,it)))
(doom-run-hooks 'doom-after-modules-init-hook)
(doom-run-hooks 'doom-before-modules-config-hook)
,@(cl-loop for (cat . mod) in module-list
if (doom-module-locate-path cat mod (concat doom-module-config-file ".el"))
for dir = (doom-module-locate-path cat mod)
if (locate-file-internal doom-module-config-file (list dir) load-suffixes)
collect `(let ((doom--current-module '(,cat . ,mod))
(doom--current-flags ',(doom-module-get cat mod :flags)))
(doom-load ,it)))