From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25362: 26.0.50; comment-region goes into an infinite loop Date: Sat, 07 Jan 2017 11:44:34 +0200 Message-ID: <83shovb3wd.fsf@gnu.org> References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> <83h95ccywn.fsf@gnu.org> <20170107082023.GA3499@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1483782330 14946 195.159.176.226 (7 Jan 2017 09:45:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2017 09:45:30 +0000 (UTC) Cc: dima@secretsauce.net, 25362@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 07 10:45:23 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPnYo-0001hB-DG for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2017 10:45:14 +0100 Original-Received: from localhost ([::1]:56614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPnYn-0003jw-JE for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2017 04:45:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPnYh-0003hp-41 for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 04:45:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPnYg-0008Oe-8B for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 04:45:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58436) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cPnYc-0008Ik-FN; Sat, 07 Jan 2017 04:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cPnYc-0004tx-9K; Sat, 07 Jan 2017 04:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 07 Jan 2017 09:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25362 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: confirmed Original-Received: via spool by 25362-submit@debbugs.gnu.org id=B25362.148378226318773 (code B ref 25362); Sat, 07 Jan 2017 09:45:02 +0000 Original-Received: (at 25362) by debbugs.gnu.org; 7 Jan 2017 09:44:23 +0000 Original-Received: from localhost ([127.0.0.1]:45602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPnXz-0004sj-0O for submit@debbugs.gnu.org; Sat, 07 Jan 2017 04:44:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPnXx-0004sW-MV for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 04:44:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPnXp-0007ri-Cl for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 04:44:16 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPnXp-0007re-9l; Sat, 07 Jan 2017 04:44:13 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2126 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cPnXo-0007dD-Gh; Sat, 07 Jan 2017 04:44:12 -0500 In-reply-to: <20170107082023.GA3499@acm.fritz.box> (message from Alan Mackenzie on Sat, 7 Jan 2017 08:20:23 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127872 Archived-At: > Date: Sat, 7 Jan 2017 08:20:23 +0000 > Cc: dima@secretsauce.net, 25362@debbugs.gnu.org > From: Alan Mackenzie > > There are actually two distinct bugs at work, here. One of them is > simple, the fix being merely giving a limit to an invocation of > c-forward-syntactic-ws. Does doing that prevent the infloop? > The other bug is more involved. It involves the invalidation of the > whitespace cache, which is currently done incorrectly when "//" is > inserted into a line which already has comment markers later on that > line. It should be simple to fix, but is actually quite tricky, with a > likelihood of unwanted side effects if it's not done very carefully. I > might be able to fix it today, but I'm not certain of that. > > I've done a bisection on the repository, and the commit that > "introduced" the bug didn't really introduce it at all - it merely > uncovered it. That commit was 4b9ac23960d2998f899287ffcf696ad33b63a69a > from 2016-07-03, "Speed up CC Mode fontification with less accurate > functions extending region". If no better solution emerges, would it make sense to revert 4b9ac23 on the release branch, as a temporary workaround that prevents the infloop? Thanks.