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

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

bug#44154: 26.3; Customize Face buffer: be able to click an inherited fa


From: Mauro Aranda
Subject: bug#44154: 26.3; Customize Face buffer: be able to click an inherited face, to customize it
Date: Tue, 27 Oct 2020 12:32:58 -0300

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Drew Adams <drew.adams@oracle.com> writes:
>
>> In Customize Face, if attribute Inherit is checked then be able to click
>> the name of an inherited face, to customize it, or at least to see its
>> attributes/definition.  
>>
>> That is, have a link on it, which invokes either `customize-face' or
>> `describe-face' for it.
>
> Makes sense.  I've now added this to Emacs 28.

> +(defun cus--face-link (widget _format)
> +  (let ((face (intern (widget-get widget :value))))
> +    (widget-create-child-and-convert
> +     widget 'face-link
> +     :button-face 'link
> +     :tag "link"
> +     :action (lambda (&rest _x)
> +               (customize-face face)))))
> +

I think this could become confusing if one edits the value of the
inherited face, because the link always points to the widget's value at
creation time.

I suggest making the link always point to the widget's current value,
like in the attached patch.

Attachment: 0001-Small-fix-to-the-new-link-for-inherited-faces-in-Cus.patch
Description: Text Data


reply via email to

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