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: Eli Zaretskii
Subject: Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents
Date: Sat, 21 Jul 2018 21:54:46 +0300

> From: Stefan Monnier <address@hidden>
> Date: Sat, 21 Jul 2018 14:44:54 -0400
> 
> >> 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.
> > What if there's no change at all, i.e. no deletions and no insertions?
> 
> Then you can either run neither of the hooks, or both.

How can we determine whether to run neither or not?

I can easily run both, but is that TRT?  It was you who requested not
to run the hooks on a range that is larger than we can determine by
looking at the results of compareseq.

> > You did read the bug report, didn't you?  Because unless I completely
> > misunderstand what you are saying, you are not describing the bug's
> > recipe.
> 
> Yes, I did.  All I read in the report seems fine, and your commit
> message sounds right as well.  But the comments seem to describe an
> incorrect behavior.

The recipe describes a case where "foo" is replaced by "foo", and the
code in compareseq tells us not to change anything.  There are no
deletions and no insertions.  Do we call the modification hooks in
this case?



reply via email to

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