[Top][All Lists]

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

Re: kill ring menu

From: Miles Bader
Subject: Re: kill ring menu
Date: 05 Jun 2002 10:22:55 +0900

Colin Walters <address@hidden> writes:
> > However, your code only implements the feature only for text properties.
> > You need to do it for overlay properties next.
> I believe the attached patch implements this; it at least worked in a
> few quick tests.
> > Miles, where are those places?
> Indeed, the only place I could find was Foverlay_get, although I just
> used a few greps.

Your patch works in a different way than I imagined the `property alias'
feature working with overlays; perhaps your way is better, I'm not sure
yet, but it's certainly simpler, which counts for a lot I think.

Basically: your patch implements overlay alteratives on a per-overlay
basis, instead of on the set of overlay properties considered as a whole
[that's why I talked about `multiple places' needing attention --
there's no single place where the search of the _whole set_ of overlays
at a point is implemented].  This only matters, of course, for locations
covered by more than one overlay that have potentially conflicting

So, consider the situtation where O1 and O2 are overlays at a point, and
overlay O1 has either a higher priority than O2, or if they have equal
priorities and O1 simply happens to come first in the lookup order.
Assume there's a `char-property-alias-alist' variable with a value of
((face font-lock-face)).

Here are some cases (here we assume that both overlays only have a
single property):

                                         face property used with:
       O1's property   O2's property   per-ov search  global-ov search
   1.  face            face             O1's face      O1's face
   2.  face            font-lock-face   O1's face      O1's face
   3.  font-lock-face  face             O1's face      O2's face
   4.  font-lock-face  font-lock-face   O1's face      O1's face

[`per-ov search' is the method you (Colin) used, whereas `global-ov search'
 is what I originally thought about]

The only difference appears to be case (3), where the O1 overlay has an
`alias' but no actual face, and O2 has an actual face.  The per-overlay
method will return O1's alias face property even though O2 has a real
`face' property.

In the case where O1 is really a higher priority than O2, it could be
argued that this makes sense -- that O1 should always override O2 when
possible.  However, what about the case where O1 simply happens to come
first in the list of overlays?  It seems odd that O2's real `face'
property should be ignored in favor of O1's mere alias in that case.


`Life is a boundless sea of bitterness'

reply via email to

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