emacs-devel
[Top][All Lists]
Advanced

[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, 06 Oct 2010 01:43:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

>>> It sounds like he's saying it would use their union, with a
>>> property-specific function used to compute that union.
>>> [and that the union computation could be done at "property setting time"
>>> rather than at display time, to avoid speed problems.]
>> I'm probably missing something here: if the union is computed at
>> put-text-property time, then how is this different from what we have
>> now?  That union will have all the properties of the character lumped
>> together, just like what we have now, right?  What am I missing?

You're missing that in order o properly update the merge when some
property is added/removed in a plane, all users of text properties will
have to follow some new conventions.

Of course, those conventions could be enforced via defadvices, I guess.

But there's probably going to be some slightly subtle issues: when
setting the `face' property, we can assume it's in the default nil
plane, but reading the `face' property might mean "the `face' property
in the nil plane" or "the merged `face' property".

> Who knows, maybe it _could_ be implemented completely in lisp given
> todays primitives ... but in order to make the layering thing work,
> all the users would need to cooperate, presumably by means of
> a wrapper layer.

Right.
Actually, that's why I like this idea: most of the work is done at
a time when Elisp can be used, so you get a lot of flexibility, and you
don't have to worry about interaction with tricky C code.
E.g. maybe the merge function could be used to enforce priorities
between planes, or to enable/disable planes (kind of like
add-to-invisibility-spec).


        Stefan





reply via email to

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