Closed Boruch-Baum closed 1 year ago
[...] Maybe
use-package
should callface-spec-set
instead ofcustomize-set-faces
?
I fully support @Boruch-Baum's suggestion to switch to face-spec-set
.
I have made the experience that custom-set-faces
does not always have the desired effect, especially when setting the default
, fixed-pitch
, and variable-pitch
faces early in the init process. This may be because custom-set-faces
is part of the themes framework, but I am not using themes.
face-spec-set
on the other hand works in all situations I have been using it. Also, the first two parameters (FACE SPEC
) are the same for both, so face-spec-set
is a drop-in replacement.
I guess that because predicate
custom-face
calls functioncustomize-set-faces
, the configured values are stored by emacs in the file defined by variablecustom-file
, so the user ends up with the customization present at two separate points in the Emacs init process. This can get confusing because making a change in the future at one point will not in all cases be sufficient, and a user would need to know / remember about the existence of bothcustom-file
and the specificuse-package
invocaion.In my personal config, I've replaced all uses of predicate
custom-face
with calls toface-spec-set
within theconfig
predicate, and removed the parallel entries in myconfig-file
.Maybe
use-package
should callface-spec-set
instead ofcustomize-set-faces
?