From 493a049dff088e021373c3f1c76774660a527c8f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 29 Jul 2022 12:24:25 +0200 Subject: [PATCH] tweak: disable tty optimization in debug mode If an error occurs before tty-run-terminal-initialization does (producing a backtrace window), it can leave Emacs in a garbled, unreadable state. --- core/core.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core.el b/core/core.el index 41521e817..11a59c04b 100644 --- a/core/core.el +++ b/core/core.el @@ -439,7 +439,7 @@ Otherwise, `en/disable-command' (in novice.el.gz) is hardcoded to write them to ;; reason; inexplicably doubling startup time for terminal Emacs. Keeping ;; it disabled will have nasty side-effects, so we simply delay it instead, ;; and invoke it later, at which point it runs quickly; how mysterious! -(unless (daemonp) +(unless (or (daemonp) init-file-debug) (advice-add #'tty-run-terminal-initialization :override #'ignore) (add-hook! 'window-setup-hook (defun doom-init-tty-h ()