emacs-devel
[Top][All Lists]
Advanced

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

Re: Consistent face for keys in *Help* and `substitute-command-keys'


From: Eli Zaretskii
Subject: Re: Consistent face for keys in *Help* and `substitute-command-keys'
Date: Fri, 05 Mar 2021 20:58:14 +0200

> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 5 Mar 2021 10:18:25 -0600
> Cc: larsi@gnus.org, emacs-devel@gnu.org
> 
> >>     => #("yxy" 0 1 (face italic) 1 2 (face (italic bold)) 2 3 (face 
> >> italic))
> >
> > That's because you add a property which was unspecified by the
> > original face.  But in the tooltip case, the function tooltip-show
> > propertizes the entire text it receives with the 'tooltip' face, so
> > any face attributes in the text that are also specified by the
> > 'tooltip' face will be overwritten.  So, for example, if the tooltip
> > text had a :background attribute, that attribute would be overwritten
> > by the background color of the 'tooltip' face.  Isn't that what you
> > see?
> 
> But that just comes down to which face takes priority, right?  So if we
> we would need to set the APPEND argument of `add-face-text-property' to
> t.

This would take care of the conflicting colors, but that's not the
original problem which caused us to talk about tooltips.  The original
problem was that someone could customize the help-key-binding face to
specify size as well.  What do you see then?

> +          (add-face-text-property 0 (length text) 'tooltip t text)

This should have a comment explaining why we use a non-nil APPEND
argument.



reply via email to

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