[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A question about overlay-modification
From: |
Joakim Jalap |
Subject: |
Re: A question about overlay-modification |
Date: |
Fri, 25 Nov 2016 09:39:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (berkeley-unix) |
Eli Zaretskii <address@hidden> writes:
>> From: Joakim Jalap <address@hidden>
>> Date: Thu, 24 Nov 2016 13:42:24 +0100
>>
>> To me that looks like the insert-in-front-hooks get run for overlays
>> which start either at START or END, not only those which start at
>> END. Likewise (but the other way around) for insert-behind-hooks.
>
> Right. But why do you think it's a problem?
I don't think it's a problem :) I was just trying to understand why it
is the way it is, and if it should actually be that way. And I guess the
answer is that it should :)
>> What am I missing here?
>
> Not sure. Possible candidates:
>
> . without the code you cite, overlays ending exactly at START and
> starting exactly at END won't get their hooks called (see the
> condition after the snippet you show
But the condition after the snippet I showed concerns different hooks.
> . some overlays (so-called "empty" overlays) start and end at the
> same buffer positions, so for them start and end positions are
> indistinguishable
True, but the condition is an 'or', so I guess they would have their
hooks called anyway.
>> (As an aside, the doc string mentions insert-before-hooks and
>> insert-after-hooks, while the code has Qinsert_in_front_hooks and
>> Qinsert_behind_hooks. Is this intentional or just left overs?)
>
> It's one of those cases where the comments lie...
Then I will rewrite it when I get to there :)
> Thanks.
Thank you!
-- Joakim