emacs-devel
[Top][All Lists]
Advanced

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

Re: Unbalanced change hooks (part 2) [Documentation fix still remaining]


From: Stefan Monnier
Subject: Re: Unbalanced change hooks (part 2) [Documentation fix still remaining]
Date: Wed, 10 Aug 2016 11:44:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>> In any case, my point is that the doc should still say "before any
>> modification" because that's really what the code *should* do.  We could
>> add a blurb in the doc saying that the before and after hooks may not be
>> properly paired (neither in number of calls nor in the specific value of
>> BEG/END),
> You mean we should add commentary saying that BEG and END _usually_
> bound the region about to be deleted, but sometimes they don't.

No.  They should always bound the region.  But sometimes the before and
after bounds are different (typically, they're tighter in a-c-f because
when the b-c-f is run we don't know yet exactly which parts will be
modified, so we give pessimistic bounds).

E.g. I think it would be perfectly acceptable to have a revert-buffer
with b-c-f called once on point-min/point-max and then a-c-f called
a bunch of times on those few places where the buffer actually needed to
be modified.

>> but we should still claim that they're both called for any and
>> all modifications (modulo inhibit-modification-hooks, obviously).
> Given that the situation has been in place for several decades, I don't
> see any urgency to fix it in 25.1.

Agreed.  But the doc should still say what the "spec" should be, so it's
clear what is a bug.


        Stefan



reply via email to

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