* Can an overlay have a non-overriding face?
@ 2016-09-12 2:21 Alex
2016-09-12 17:03 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Alex @ 2016-09-12 2:21 UTC (permalink / raw)
To: help-gnu-emacs
Suppose there are two overlays A and B. Is it possible for overlay A to
have a higher priority than B yet for the face (or any arbitrary
property) property to not override B's?
If not, would that be a reasonable feature request? Currently I made a
workaround where I copy overlay A, lower its priority, and then put the
face on that overlay.
It would be nice if that wasn't necessary.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Can an overlay have a non-overriding face?
2016-09-12 2:21 Can an overlay have a non-overriding face? Alex
@ 2016-09-12 17:03 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2016-09-12 17:03 UTC (permalink / raw)
To: help-gnu-emacs
> From: Alex <agrambot@gmail.com>
> Date: Sun, 11 Sep 2016 20:21:22 -0600
>
> Suppose there are two overlays A and B. Is it possible for overlay A to
> have a higher priority than B yet for the face (or any arbitrary
> property) property to not override B's?
As the ELisp manual says, faces do not override each other, they are
merged:
The priority matters when two or more overlays cover the same
character and both specify the same property; the one whose
‘priority’ value is larger overrides the other. For the ‘face’
property, the higher priority overlay’s value does not completely
override the other value; instead, its face attributes override the
face attributes of the lower priority ‘face’ property.
IOW, only the same attributes in the lower-priority overlay's face are
overridden, the rest of that face's attributes are kept.
> If not, would that be a reasonable feature request? Currently I made a
> workaround where I copy overlay A, lower its priority, and then put the
> face on that overlay.
>
> It would be nice if that wasn't necessary.
Depends on the use case. Please file a feature request, and please
describe your use cases there.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-12 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 2:21 Can an overlay have a non-overriding face? Alex
2016-09-12 17:03 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).