[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:22:21 +0300 |
> From: Stefan Monnier <address@hidden>
> Cc: Eli Zaretskii <address@hidden>
> Date: Sat, 21 Jul 2018 14:16:29 -0400
>
> > - prepare_to_modify_buffer (from, to, NULL);
> > + /* If k >= l, it means nothing needs to be deleted. */
> > + if (k < l)
> > + prepare_to_modify_buffer (from, to, NULL);
>
> This comment makes it sound like before-change-functions won't be run
> when there are only insertions (which would be wrong).
>
> > - signal_after_change (from, to - from, updated_to - from);
> > - update_compositions (from, updated_to, CHECK_INSIDE);
> > + /* Only call after-change-functions if something was actually
> > + inserted. */
> > + if (from < updated_to)
> > + {
> > + signal_after_change (from, to - from, updated_to - from);
> > + update_compositions (from, updated_to, CHECK_INSIDE);
> > + }
>
> And this comment makes it sound like after-change-functions won't be run
> when there are only deletions (which would be similarly wrong).
I don't understand your claims, sorry. Is the code wrong, or are the
comments wrong? And what would you expect to see in the buffer
modification hooks calls for the recipe of that bug?
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents, Stefan Monnier, 2018/07/21
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents,
Eli Zaretskii <=
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents, Stefan Monnier, 2018/07/21
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents, Eli Zaretskii, 2018/07/21
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents, Stefan Monnier, 2018/07/21
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents, Eli Zaretskii, 2018/07/21
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents, Stefan Monnier, 2018/07/21
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents, Richard Stallman, 2018/07/21
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents, Eli Zaretskii, 2018/07/21
- Re: [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents, Stefan Monnier, 2018/07/22