bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#77928: [PATCH] use-package :custom-face is meant to behave like cust


From: John Wiegley
Subject: bug#77928: [PATCH] use-package :custom-face is meant to behave like custom-set-face
Date: Thu, 24 Apr 2025 18:17:06 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

>>>>> Eli Zaretskii <eliz@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





reply via email to

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