diff --git a/core/cli/byte-compile.el b/core/cli/byte-compile.el index 6e16b1f97..6bd78473f 100644 --- a/core/cli/byte-compile.el +++ b/core/cli/byte-compile.el @@ -92,8 +92,8 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files." ;; But first we must be sure that Doom and your private config have been ;; fully loaded. Which usually aren't so in an noninteractive session. - (doom-load-autoloads-file doom-autoload-file) - (doom-load-autoloads-file doom-package-autoload-file) + (let (noninteractive) + (doom-initialize 'force-p)) ;; (unless target-dirs @@ -103,7 +103,7 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files." (list doom-core-dir) ;; Omit `doom-private-dir', which is always first (cl-remove-if-not (lambda (path) (file-in-directory-p path doom-emacs-dir)) - (cdr (doom-module-load-path))))) + (nreverse (cdr (doom-module-load-path)))))) ;; Assemble el files we want to compile; taking into account that MODULES ;; may be a list of MODULE/SUBMODULE strings from the command line. diff --git a/core/core.el b/core/core.el index 980b8e259..30dd31222 100644 --- a/core/core.el +++ b/core/core.el @@ -521,27 +521,26 @@ to least)." (user-error "Run `bin/doom refresh' to generate them"))) ;; Load shell environment, optionally generated from 'doom env' - (unless noninteractive + (if noninteractive + (require 'core-cli) (when (file-exists-p doom-env-file) - (doom-load-envvars-file doom-env-file))))) + (doom-load-envvars-file doom-env-file)) + + (add-hook 'window-setup-hook #'doom-display-benchmark-h) + (require 'core-keybinds) + (require 'core-ui) + (require 'core-projects) + (require 'core-editor) + + (when (cdr command-line-args) + (add-to-list 'command-switch-alist + (cons "--restore" #'doom-restore-session-handler)))))) ;; ;;; Bootstrap Doom (doom-initialize noninteractive) -(if noninteractive - (require 'core-cli) - (add-hook 'window-setup-hook #'doom-display-benchmark-h) - (require 'core-keybinds) - (require 'core-ui) - (require 'core-projects) - (require 'core-editor) - - (when (cdr command-line-args) - (add-to-list 'command-switch-alist - (cons "--restore" #'doom-restore-session-handler)))) - (doom-initialize-modules) (provide 'core)