unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <83bmb0xxcy.fsf@gnu.org> (raw)
In-Reply-To: <jwvo9f0pid5.fsf-monnier+emacsdiffs@gnu.org> (message from Stefan Monnier on Sat, 21 Jul 2018 14:16:29 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>
> 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?




  reply	other threads:[~2018-07-21 18:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180721180616.6608.26581@vcs0.savannah.gnu.org>
     [not found] ` <20180721180618.5CEA9208D4@vcs0.savannah.gnu.org>
2018-07-21 18:16   ` [Emacs-diffs] emacs-26 671dc5a: Fix calls to buffer modification hooks from replace-buffer-contents Stefan Monnier
2018-07-21 18:22     ` Eli Zaretskii [this message]
2018-07-21 18:29       ` Stefan Monnier
2018-07-21 18:35         ` Eli Zaretskii
2018-07-21 18:44           ` Stefan Monnier
2018-07-21 18:54             ` Eli Zaretskii
2018-07-21 20:46               ` Stefan Monnier
2018-07-22  2:15                 ` Richard Stallman
2018-07-22  2:43                 ` Eli Zaretskii
2018-07-22  5:18                   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bmb0xxcy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).