From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#18022: 24.3; Emacs hard locks when attempting to do a replacement with ^M in it. Date: Sat, 4 Oct 2014 18:38:22 +0000 Message-ID: <20141004183822.GA3144__37117.8231820979$1412448340$gmane$org@acm.acm> References: <83ha2i901p.fsf@gnu.org> <8338e28t9r.fsf@gnu.org> <20140716214144.GA4052@acm.acm> <20140719203310.GA12706@acm.acm> <20140723184146.GA2969@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1412448340 26509 80.91.229.3 (4 Oct 2014 18:45:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2014 18:45:40 +0000 (UTC) Cc: Marty Rosenberg , 18022@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 04 20:45:33 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XaUKi-0001n8-GS for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Oct 2014 20:45:32 +0200 Original-Received: from localhost ([::1]:44903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaUKi-0005Y2-6n for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Oct 2014 14:45:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaUKV-0005Xb-IW for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2014 14:45:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaUKO-0001Vr-3k for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2014 14:45:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaUKG-0001FM-3f; Sat, 04 Oct 2014 14:45:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XaUKF-0007BW-Gh; Sat, 04 Oct 2014 14:45:03 -0400 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: Sat, 04 Oct 2014 18:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18022 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 18022-submit@debbugs.gnu.org id=B18022.141244824927527 (code B ref 18022); Sat, 04 Oct 2014 18:45:03 +0000 Original-Received: (at 18022) by debbugs.gnu.org; 4 Oct 2014 18:44:09 +0000 Original-Received: from localhost ([127.0.0.1]:33228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XaUJM-00079s-ST for submit@debbugs.gnu.org; Sat, 04 Oct 2014 14:44:09 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:19458 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XaUJI-00079g-S6 for 18022@debbugs.gnu.org; Sat, 04 Oct 2014 14:44:06 -0400 Original-Received: (qmail 50097 invoked by uid 3782); 4 Oct 2014 18:43:59 -0000 Original-Received: from acm.muc.de (pD9518C8A.dip0.t-ipconnect.de [217.81.140.138]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 04 Oct 2014 20:43:58 +0200 Original-Received: (qmail 3273 invoked by uid 1000); 4 Oct 2014 18:38:22 -0000 Content-Disposition: inline In-Reply-To: <20140723184146.GA2969@acm.acm> User-Agent: Mutt/1.5.21 (2010-09-15) 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.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94127 Archived-At: Hello, Stefan. Ping? On Wed, Jul 23, 2014 at 06:41:46PM +0000, Alan Mackenzie wrote: > Hi, everybody! > On Sat, Jul 19, 2014 at 08:33:10PM +0000, Alan Mackenzie wrote: > > Hello, Stefan, Marty and Eli. > > Looking at back_comment, just after the main loop at L+205, we have the > > code which restores point and the current syntax table: > > if (comstart_pos == 0) > > { > > from = comment_end; > > from_byte = comment_end_byte; > > => UPDATE_SYNTAX_TABLE_FORWARD (comment_end - 1); > > } > > It seems to me that that " - 1" is what is causing the syntax table to be > > restored to the value for ">", and shouldn't be there. Stefan, am I > > right? > I should have included a patch. Sorry! Here it is, in case anybody > didn't feel like working through the textual description. I think this > fixes the bug, if it's correct. > === modified file 'src/syntax.c' > *** src/syntax.c 2014-07-09 23:39:58 +0000 > --- src/syntax.c 2014-07-23 18:26:45 +0000 > *************** > *** 825,831 **** > { > from = comment_end; > from_byte = comment_end_byte; > ! UPDATE_SYNTAX_TABLE_FORWARD (comment_end - 1); > } > /* If comstart_pos is set and we get here (ie. didn't jump to `lossage' > or `done'), then we've found the beginning of the non-nested comment. */ > --- 825,831 ---- > { > from = comment_end; > from_byte = comment_end_byte; > ! UPDATE_SYNTAX_TABLE_FORWARD (comment_end); > } > /* If comstart_pos is set and we get here (ie. didn't jump to `lossage' > or `done'), then we've found the beginning of the non-nested comment. */ -- Alan Mackenzie (Nuremberg, Germany).