tweak: more debug output at startup

Particularly to do with profiles, in case the user starts Emacs with
--debug or --debug-init.
This commit is contained in:
Henrik Lissner 2022-07-28 11:42:29 +02:00
parent 48e3603dfe
commit 44f169740e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -123,6 +123,8 @@
(user-error "No %S profile found" profile))) (user-error "No %S profile found" profile)))
(when init-file-debug
(message "Selected profile: %s" profile))
;; Ensure the selected profile persists through the session ;; Ensure the selected profile persists through the session
(setenv "DOOMPROFILE" profile)))) (setenv "DOOMPROFILE" profile))))
@ -131,10 +133,10 @@
;;; Bootstrap ;;; Bootstrap
;; Load the heart of Doom Emacs ;; Load the heart of Doom Emacs
(unless (load (expand-file-name "core/core" user-emacs-directory) t t) (unless (load (expand-file-name "core/core" user-emacs-directory) t (not init-file-debug))
;; ...but if that fails, then this is likely not a Doom config. ;; ...but if that fails, then this is likely not a Doom config.
(setq early-init-file (expand-file-name "early-init" user-emacs-directory)) (setq early-init-file (expand-file-name "early-init" user-emacs-directory))
(load early-init-file t t)) (load early-init-file t (not init-file-debug)))
;; We hijack Emacs' initfile resolver to inject our own entry point. Why do ;; We hijack Emacs' initfile resolver to inject our own entry point. Why do
;; this? Because: ;; this? Because: