Enhance minimal-emacs-load-user-init

Enhance minimal-emacs-load-user-init to display a message when Emacs
starts with --debug-init mode.
This commit is contained in:
James Cherti
2025-08-26 22:39:40 -04:00
parent 429d3a6697
commit 2d69fbf554

View File

@@ -138,11 +138,12 @@ pre-early-init.el, and post-early-init.el.")
(let ((init-file (expand-file-name filename
minimal-emacs-user-directory)))
(if (not minimal-emacs-load-compiled-init-files)
(load init-file :no-error :no-message :nosuffix)
(load init-file :no-error (not (bound-and-true-p init-file-debug))
:nosuffix)
;; Remove the file suffix (.el, .el.gz, etc.) to let the `load' function
;; select between .el and .elc files.
(setq init-file (minimal-emacs--remove-el-file-suffix init-file))
(load init-file :no-error :no-message))))
(load init-file :no-error (not (bound-and-true-p init-file-debug))))))
(minimal-emacs-load-user-init "pre-early-init.el")