From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: emacs-27 3bce7ec: CC Mode: Protect against consecutive calls to before-change-functions ... Date: Wed, 4 Mar 2020 21:30:14 +0000 Message-ID: <20200304213014.GB26206@ACM> References: <20200223194642.5362.21709@vcs0.savannah.gnu.org> <20200223194643.A9A05206ED@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="80261"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Glenn Morris , emacs-devel To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 04 22:30:56 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j9bbT-000Koj-FG for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Mar 2020 22:30:55 +0100 Original-Received: from localhost ([::1]:39992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9bbS-0004OL-FE for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Mar 2020 16:30:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49098) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9bat-0003hN-SJ for emacs-devel@gnu.org; Wed, 04 Mar 2020 16:30:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9bas-0000kX-RG for emacs-devel@gnu.org; Wed, 04 Mar 2020 16:30:19 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:17977 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1j9bas-0000jw-Gv for emacs-devel@gnu.org; Wed, 04 Mar 2020 16:30:18 -0500 Original-Received: (qmail 28696 invoked by uid 3782); 4 Mar 2020 21:30:17 -0000 Original-Received: from acm.muc.de (p4FE15B29.dip0.t-ipconnect.de [79.225.91.41]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 04 Mar 2020 22:30:14 +0100 Original-Received: (qmail 26218 invoked by uid 1000); 4 Mar 2020 21:30:14 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245243 Archived-At: 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 : > >> 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).