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

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

bug#25348: `display` property faces are prioritized above overlays


From: Eli Zaretskii
Subject: bug#25348: `display` property faces are prioritized above overlays
Date: Wed, 04 Jan 2017 18:06:31 +0200

> From: Travis Foster <address@hidden>
> Date: Tue, 3 Jan 2017 14:52:26 -0800
> 
> Yes, the text in the buffer is replaced by its display text, with the face. 
> Then, I would expect the overlay to apply
> to all the text on the line, including the replacement text. Since the 
> properties in overlays are supposed to take
> priority over the properties in the buffer itself, I don't think it makes 
> sense for the replacement to take priority
> over the overlay. Is that wrong?

Drew is right: the priority of overlays over text properties only
comes into play when both text properties and overlays are set on the
same region of text.  In your case, the 'face' property is put on a
display string, whereas the hl-line overlay is on buffer text.  So
priority considerations don't apply here.

> It seems that the replacement should occur, and then the resulting
> text should be modified further by the overlay.

Emacs uses the face from the overlay only for text to which this
overlay is applied.  The display string is therefore using its own
face definitions, which completely override those from the hl-line
overlay.

If you define a face for the display string that only specifies a
foreground color, then Emacs will use the hl-line overlay for the
background color.

This is normal operation of the Emacs display engine, it has been like
that since Emacs 21.  IOW, this is not a bug.





reply via email to

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