From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#25362: 26.0.50; comment-region goes into an infinite loop Date: Mon, 9 Jan 2017 22:04:39 +0000 Message-ID: <20170109220439.GA4725@acm.fritz.box> References: <20170109211801.GA4752@acm.fritz.box> <87pojvlxe3.fsf@secretsauce.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1483999517 4913 195.159.176.226 (9 Jan 2017 22:05:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Jan 2017 22:05:17 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 25362@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 09 23:05:13 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 1cQi3y-0000WQ-RP for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jan 2017 23:05:10 +0100 Original-Received: from localhost ([::1]:43397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQi43-0004Qb-Aq for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jan 2017 17:05:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQi3y-0004Ox-6V for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2017 17:05:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQi3s-0005PJ-Ak for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2017 17:05:10 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32813) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cQi3q-0005P4-R8; Mon, 09 Jan 2017 17:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cQi3q-0007uK-Iq; Mon, 09 Jan 2017 17:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Mon, 09 Jan 2017 22:05: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.148399949730383 (code B ref 25362); Mon, 09 Jan 2017 22:05:02 +0000 Original-Received: (at 25362) by debbugs.gnu.org; 9 Jan 2017 22:04:57 +0000 Original-Received: from localhost ([127.0.0.1]:48212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQi3j-0007tx-Jr for submit@debbugs.gnu.org; Mon, 09 Jan 2017 17:04:57 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:22677 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cQi3i-0007tn-BN for 25362@debbugs.gnu.org; Mon, 09 Jan 2017 17:04:54 -0500 Original-Received: (qmail 54207 invoked by uid 3782); 9 Jan 2017 22:04:52 -0000 Original-Received: from acm.muc.de (p548C7205.dip0.t-ipconnect.de [84.140.114.5]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 09 Jan 2017 23:04:52 +0100 Original-Received: (qmail 5354 invoked by uid 1000); 9 Jan 2017 22:04:39 -0000 Content-Disposition: inline In-Reply-To: <87pojvlxe3.fsf@secretsauce.net> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:127943 Archived-At: Hello, Dima On Mon, Jan 09, 2017 at 01:46:28PM -0800, Dima Kogan wrote: > Alan Mackenzie writes: > > As already observed, this bug happens simply in C Mode by attempting to > > comment out the four lines inside the function, doing this by marking > > the lines then C-c C-c. > > The cause was a rather nasty situation where a "syntactic whitespace > > cache", designed to facilitate moving rapidly over large areas of WS > > (particularly long comments at the beginning of files) got screwed up by > > the insertion of "// " onto a line already containing a "//" later on. > > Here is a patch. It is not yet in its final form (the comments need > > fixing). Would you please try it out and let me know how well/how badly > > it works: > Hi. I'm now running with this patch, and some cursory testing says that > it works. I briefly ran into an issue where I > 1. highlighted a problematic region > 2. hit M-; (this worked correctly) > 3. Hit M-/ to undo > This undo restored the text correctly, but the whole region remained > highlighted as a comment, even after the undo removed the comment > characters. I hit this once, but cannot reproduce it anymore. If this > description means something to you, feel free to act on it :) I'll have a think about this some time (it's late at night in Europe, now). > > Thanks for this rather obscure bug report. :-) > Heh. I just report issues that pop up during the course of the day. We > owe you hugely for responding to these bugs and maintaining cc-mode. > Thanks! That's appreciated! -- Alan Mackenzie (Nuremberg, Germany).