emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is this "save practice" (setting default font scale)?


From: Stefan Monnier
Subject: Re: Is this "save practice" (setting default font scale)?
Date: Fri, 20 Nov 2020 10:52:35 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> (add-hook 'after-make-frame-functions
>             (lambda (frame) 
>               (set-face-attribute 'default nil :height 160)))
[...]
> I have refactored my init file and trying to push some things to
> early-init to save some load time. What I have found is that above
> little code adds ~200 ms to the init time; take or give.

That's probably because of the extra work it imposes because it changes
the default face after the first frame is created: Emacs has just
created the frame (which involves realizing a bunch of faces) and you're
telling it should go and redo some of that work with a new value of
`default`.

Setting your faces via Custom will avoid this double work because the
new setting can be installed before creating the first frame, so the
frame can be created immediately with the right faces.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]