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: Daniel Colascione
Subject: Re: Unbalanced change hooks (part 2) [Documentation fix still remaining]
Date: Tue, 30 Aug 2016 11:06:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 08/30/2016 11:01 AM, Alan Mackenzie wrote:
Hello, Daniel.

On Tue, Aug 30, 2016 at 10:46:44AM -0700, Daniel Colascione wrote:
On 08/30/2016 10:42 AM, Eli Zaretskii wrote:
Cc: address@hidden, address@hidden
From: Daniel Colascione <address@hidden>
Date: Tue, 30 Aug 2016 10:27:45 -0700

+The region given to each of these functions is a conservative
+approximation of the region about to changed.  After running the
+before-change-functions, Emacs will make zero or more fine-grained
+buffer changes and run after-change-functions for each.  Do not expect
+before-change-functions and after-change-functions to be called in
+balanced pairs.

The last sentence here is repeated afterwards, for no good reason.
(Also, the markup is missing, but that's just an aside.)

I figured it was a good idea to highlight this fact directly in the
variable documentation blob. I can add a "see below" link.

Why are you advocating this?  It is not true.  You _can_ expect b-c-f and
a-c-f to be balanced in all but, perhaps, one occurrence per million.  It
happens so seldom that in practice, one can assume that b-c-f and a-c-f
match completely[*].  You are describing the exception as though it were the
typical case.

[*] provided the exceptions are handled somehow.

[ .... ]


I'd vastly prefer the calls to be balanced. It looks like it will be difficult to make them that way, so describing in the manual behavior that preserves most of the goodness and spells out the workarounds mode authors need to use seems like the least awful approach.



reply via email to

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