tweak: suppress 'Loading X...' messages at startup
From site-files, particularly. This *might* fix the white flash while Emacs is starting up in some scenarios.
This commit is contained in:
parent
798df6bc9e
commit
68ed4e6298
1 changed files with 13 additions and 1 deletions
|
@ -49,7 +49,19 @@
|
|||
(lambda ()
|
||||
(setq-default inhibit-redisplay nil
|
||||
inhibit-message nil)
|
||||
(redisplay))))
|
||||
(redisplay)))
|
||||
|
||||
;; Site files tend to use `load-file', which emits "Loading X..." messages in
|
||||
;; the echo area, which in turn triggers a redisplay. Redisplays can have a
|
||||
;; substantial effect on startup times and in this case happens so early that
|
||||
;; Emacs may flash white while starting up.
|
||||
(define-advice load-file (:override (file) silence)
|
||||
(load file nil 'nomessage))
|
||||
|
||||
;; Undo our `load-file' advice above, to limit the scope of any edge cases it
|
||||
;; may introduce down the road.
|
||||
(define-advice startup--load-user-init-file (:before (&rest _) init-doom)
|
||||
(advice-remove #'load-file #'load-file@silence)))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue