[Top][All Lists]

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

Re: Combining face and map stuff

From: Stefan Monnier
Subject: Re: Combining face and map stuff
Date: Wed, 13 Oct 2010 08:42:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> > Let's say we have a buffer, in which both package foo and package bar
>> > defined different faces for the same piece of text.  Which one of them
>> > will be displayed, and how would the display engine know to choose it?
>> Internally, one of them sets the property (foo . face) to <face1>, the
>> other one sets the property (bar . face) to <face2>, and when these are
>> set, the `face' property gets set to (<face1> <face2>).  The display
>> engine only looks at the `face' property, just as before.

> So it's just a convenience feature, to avoid something like

>   get existing text property value
>   merge with another value
>   put it back with add-text-property

> in every package?

Yes, tho it goes further than that, since the above steps still leave
some questions unanswered, e.g.:
- how to make sure all packages use the same "merge" function?
- how should a package remove its property values without also removing
  the other packages's property values.


reply via email to

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