GNU bug report logs -
#77928
[PATCH] use-package :custom-face is meant to behave like custom-set-face
Previous Next
Reported by: Michael Shields <shields <at> msrl.com>
Date: Sat, 19 Apr 2025 20:42:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>>>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> The attached patch fixes a bug where migrating a face spec from custom.el
>> to use-package :custom-face results in a surprising behavior change: the
>> new spec is overlaid on the default value instead of replacing it. This
>> seems to have been an unintended consequence of
>> https://github.com/jwiegley/use-package/issues/934.
> John, any comments?
Well, this patch would invalidate the current documentation:
(use-package example
:custom-face
(example-1-face ((t (:foreground "LightPink"))))
(example-2-face ((t (:foreground "LightGreen"))) face-defspec-spec))
It will remove the ability to specify a SPEC-TYPE argument in the declaration,
and instead would force it to always be `face-defface-spec', no? At the moment
the default uses `face-override-spec', when no such argument is provided.
If face-defface-spec is the desired default behaivor — while dropping the
current ability to customize that behavior in the declaration — I have no
objection, but the Texinfo example will need to be updated as well.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
This bug report was last modified 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.