From a3a37c233d7b695b30701ad056ee2df49c95e576 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Sun, 2 Feb 2025 21:25:39 -0500 Subject: [PATCH] Update the order of mode-line-format sexp --- early-init.el | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/early-init.el b/early-init.el index 7ad2698..78d0df5 100644 --- a/early-init.el +++ b/early-init.el @@ -121,29 +121,27 @@ When set to non-nil, Emacs will automatically call `package-initialize' and (unless noninteractive (unless minimal-emacs-debug - (unless minimal-emacs-debug - ;; Suppress redisplay and redraw during startup to avoid delays and - ;; prevent flashing an unstyled Emacs frame. - ;; (setq-default inhibit-redisplay t) ; Can cause artifacts - (setq-default inhibit-message t) + ;; Suppress redisplay and redraw during startup to avoid delays and + ;; prevent flashing an unstyled Emacs frame. + ;; (setq-default inhibit-redisplay t) ; Can cause artifacts + (setq-default 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) ; Can cause artifacts - (setq-default inhibit-message nil) - (remove-hook 'post-command-hook #'minimal-emacs--reset-inhibited-vars-h)) + ;; 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) ; Can cause artifacts + (setq-default 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))) + (add-hook 'post-command-hook + #'minimal-emacs--reset-inhibited-vars-h -100) (put 'mode-line-format 'initial-value (default-toplevel-value 'mode-line-format)) (setq-default mode-line-format nil) + (dolist (buf (buffer-list)) + (with-current-buffer buf + (setq mode-line-format nil))) (defun minimal-emacs--startup-load-user-init-file (fn &rest args) "Advice for startup--load-user-init-file to reset mode-line-format."