From 969d021476558fc3c34c6e44953438853b0f47b6 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Mon, 16 Sep 2024 09:00:22 -0400 Subject: [PATCH] Set mode-line-format nil to all initial buffers --- early-init.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/early-init.el b/early-init.el index daa8add..d8371b1 100644 --- a/early-init.el +++ b/early-init.el @@ -143,16 +143,23 @@ When set to non-nil, Emacs will automatically call `package-initialize' and (unless noninteractive (unless minimal-emacs-debug - ;; Disable mode-line-format during init + ;; Suppress redisplay and redraw during startup to avoid delays and + ;; prevent flashing an unstyled Emacs frame. (setq-default inhibit-redisplay t inhibit-message t) + + ;; Reset the above variables to prevent Emacs from appearing frozen or + ;; visually corrupted after startup or if a startup error occurs. (defun minimal-emacs--reset-inhibited-vars-h () (setq-default inhibit-redisplay nil - ;; Inhibiting `message' only prevents redraws and inhibit-message nil) (remove-hook 'post-command-hook #'minimal-emacs--reset-inhibited-vars-h)) (add-hook 'post-command-hook #'minimal-emacs--reset-inhibited-vars-h -100) + (dolist (buf (buffer-list)) + (with-current-buffer buf + (setq mode-line-format nil))) + (put 'mode-line-format 'initial-value (default-toplevel-value 'mode-line-format)) (setq-default mode-line-format nil)