unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Glenn Morris <rgm@gnu.org>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: emacs-27 3bce7ec: CC Mode: Protect against consecutive calls to before-change-functions ...
Date: Wed, 4 Mar 2020 21:30:14 +0000	[thread overview]
Message-ID: <20200304213014.GB26206@ACM> (raw)
In-Reply-To: <BDEB82C9-EE97-4C36-83A8-BBFA7425C90B@acm.org>

Hello, Mattias.

On Sun, Mar 01, 2020 at 12:49:39 +0100, Mattias Engdegård wrote:
> 28 feb. 2020 kl. 17.54 skrev Glenn Morris <rgm@gnu.org>:

> >>   CC Mode: Protect against consecutive calls to
> >>   before-change-functions ...

> > This causes srecode-utest-getset-output in
> > test/lisp/cedet/srecode-utest-getset.el to fail:

> Indeed, and so does electric-tests. Condensed reproduction:

> (with-temp-buffer
>   (c-mode)
>   (insert "a")
>   (comment-region (point-min) (point-max)))

Actually, your scenario and Glenn's were caused by different bugs.  ;-)

> Alan, it looks like the code has lost control over c-new-END.

Yes.

> c-after-change over-adjusts it to a value beyond the buffer size.  The
> problem seems to go away with the expedient below but it is unlikely
> to be the right solution.

It wasn't.  ;-)  I've fixed both bugs in the emacs-27 branch.

-- 
Alan Mackenzie (Nuremberg, Germany).



  parent reply	other threads:[~2020-03-04 21:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200223194642.5362.21709@vcs0.savannah.gnu.org>
     [not found] ` <20200223194643.A9A05206ED@vcs0.savannah.gnu.org>
2020-02-28 16:54   ` emacs-27 3bce7ec: CC Mode: Protect against consecutive calls to before-change-functions Glenn Morris
2020-03-01 11:49     ` Mattias Engdegård
2020-03-01 21:26       ` Alan Mackenzie
2020-03-04 21:30       ` Alan Mackenzie [this message]
2020-03-04 21:24     ` Alan Mackenzie

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=20200304213014.GB26206@ACM \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=mattiase@acm.org \
    --cc=rgm@gnu.org \
    /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).