aboutsummaryrefslogtreecommitdiff
path: root/early-init.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-26 19:38:15 -0500
committerCraig Jennings <c@cjennings.net>2026-05-26 19:38:15 -0500
commit09af335782d678a15e6b4931f7d5e8c5e7eb034c (patch)
tree8fb0af60d7e15c1c238662493d6f278dc2eb743a /early-init.el
parent7c203bf55e72c9e48ea838be15ac02512b6983d2 (diff)
downloaddotemacs-09af335782d678a15e6b4931f7d5e8c5e7eb034c.tar.gz
dotemacs-09af335782d678a15e6b4931f7d5e8c5e7eb034c.zip
fix(early-init): stop wiring C-g to the debugger at startup
Setting debug-on-quit t during startup turns C-g into a debugger trigger instead of an abort, so the normal "break out of a hang" reflex drops you into a recursive-edit you can't C-g out of. Worse, debug-on-error is also on during startup. An init error pops the debugger before the emacs-startup-hook cleanup runs, and debug-on-quit stays t for the whole session. I hit exactly that: a quit cascaded into a debugger loop that needed killall to escape. I dropped debug-on-quit from the startup block and removed its now-redundant cleanup line. debug-on-error stays on during startup so init errors are still caught. C-g stays an escape hatch.
Diffstat (limited to 'early-init.el')
-rw-r--r--early-init.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/early-init.el b/early-init.el
index 50a1de1d..d45faef7 100644
--- a/early-init.el
+++ b/early-init.el
@@ -48,13 +48,17 @@
;; uncomment when repo signatures expire and package installation is necessary
;; (setq package-check-signature nil)
-(setq debug-on-error t) ;; default nil. turn on to debug issues only.
-(setq debug-on-quit t) ;; debug on C-g (breaking out of hangs/freezes)
+(setq debug-on-error t) ;; default nil. on during startup to catch init errors.
+
+;; Deliberately NOT setting `debug-on-quit' here. Leaving it on wires C-g to
+;; the debugger, so the normal "break out of a hang" reflex traps you in a
+;; recursive-edit instead of aborting -- and if a startup error fires before
+;; the cleanup hook below runs, the flag stays on for the whole session.
+;; C-g stays an escape hatch.
(add-hook 'emacs-startup-hook
(lambda ()
- (setq debug-on-error nil)
- (setq debug-on-quit nil)))
+ (setq debug-on-error nil)))
;; ------------------------------ Bug Workarounds ------------------------------