GNU bug report logs - #4911
mouse-face property should merge face attributes, not replace

Previous Next

Package: emacs;

Reported by: Dave Aspinall <daveaspin <at> googlemail.com>

Date: Thu, 12 Nov 2009 12:55:04 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Clément Pit-Claudel <clement.pitclaudel <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 4911 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: bug#4911: mouse-face property should merge face attributes, not replace
Date: Fri, 8 May 2020 11:58:13 -0400
[Message part 1 (text/plain, inline)]
On 08/05/2020 11.20, Eli Zaretskii wrote:
>> Cc: drew.adams <at> oracle.com, 4911 <at> debbugs.gnu.org, larsi <at> gnus.org
>> From: Clément Pit-Claudel <clement.pitclaudel <at> gmail.com>
>> Date: Fri, 8 May 2020 11:01:35 -0400
>>
>>> I'm not sure I understand what you mean by "span" in general and
>>> "current span" in particular.
>>
>> I meant a range of text with a single mouse-face property.
> 
> But if the underlying text has different face properties, the range of
> text should now be divided into different "spans", no?

Yes, sorry for the confusing terminology :'(
Basically I meant to say that we keep the code used for locating which span of text is covered by a mouse highlight; namely, we look for a range of text with an `eq' mouse-face value.

>>>   . realizing and caching 2 faces whenever we render some text which
>>>     has a mouse-face property;
>>
>> Don't we already do this, currently?
> 
> No, because we only have a single mouse-face.  With this feature, we'd
> have multiple ones, and they are only known when the face of the text
> is being realized, because each character could have different sources
> of face information, which need to be merged.

Ah, I see.  Right now we don't need to look at the regular faces at all; of course.

>>>   . using the corresponding face when redrawing the highlighted
>>>     portions of text by looking at the positions of each of the
>>>     affected glyphs (which might be complicated if the text doesn't
>>>     come from a buffer)
>>
>> But isn't that already taken care of by the existing highlighting code?
> 
> No, because the existing code always uses the same mouse-face.  So it
> only needs to know which glyphs need to be redrawn with that single
> face.

Got it.  My hope was that changing Mouse_HLInfo would allow us to get this almost "for free"

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 5 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.