emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hoo


From: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents
Date: Sat, 21 Jul 2018 14:29:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> I don't understand your claims, sorry.  Is the code wrong, or are the
> comments wrong?

I don't understand enough of the code to have an opinion on it, but the
comments describe a behavior which would be wrong: both before-c-f and
after-c-f- need to be run for any buffer change, even if it's only an
insertion or only a deletion.

> And what would you expect to see in the buffer
> modification hooks calls for the recipe of that bug?

Lots of options, but basically: one call to b-c-f with FROM being < then
the first position at which a deletion or insertion will take place and
TO being after the last such position (e.g. from==to if the change is
a single insertion); followed by one call to a-c-f with the
same constraints (e.g. from==to if it's a single deletion).


        Stefan




reply via email to

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