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#16526: 24.3.50; scroll-conservatively & c-mode regression Date: Sat, 28 Jun 2014 16:30:59 +0000 Message-ID: <20140628163059.GA2632@acm.acm> References: <83wqc8sxd2.fsf@gnu.org> <20140625213206.GA3604@acm.acm> <20140627203416.GA4395@acm.acm> <20140628130059.GA4144@acm.acm> <53AECA88.7010401@gmx.at> <20140628145509.GB4144@acm.acm> <834mz56pai.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1403973391 4272 80.91.229.3 (28 Jun 2014 16:36:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Jun 2014 16:36:31 +0000 (UTC) Cc: 16526@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 28 18:36:21 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 1X0vbx-0007ac-40 for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jun 2014 18:36:21 +0200 Original-Received: from localhost ([::1]:55294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0vbw-0007zR-Kb for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jun 2014 12:36:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0vbp-0007zL-6m for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2014 12:36:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0vbk-0002pP-4t for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2014 12:36:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0vbe-0002ox-II; Sat, 28 Jun 2014 12:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X0vbd-00072T-Pq; Sat, 28 Jun 2014 12:36:01 -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, 28 Jun 2014 16:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16526 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 16526-submit@debbugs.gnu.org id=B16526.140397334127019 (code B ref 16526); Sat, 28 Jun 2014 16:36:01 +0000 Original-Received: (at 16526) by debbugs.gnu.org; 28 Jun 2014 16:35:41 +0000 Original-Received: from localhost ([127.0.0.1]:36282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0vbH-00071h-NB for submit@debbugs.gnu.org; Sat, 28 Jun 2014 12:35:40 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:57986 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0vbB-00071K-T0 for 16526@debbugs.gnu.org; Sat, 28 Jun 2014 12:35:38 -0400 Original-Received: (qmail 9278 invoked by uid 3782); 28 Jun 2014 16:35:32 -0000 Original-Received: from acm.muc.de (pD9519F94.dip0.t-ipconnect.de [217.81.159.148]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 28 Jun 2014 18:35:29 +0200 Original-Received: (qmail 2670 invoked by uid 1000); 28 Jun 2014 16:30:59 -0000 Content-Disposition: inline In-Reply-To: <834mz56pai.fsf@gnu.org> 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:90941 Archived-At: Hi, Eli. On Sat, Jun 28, 2014 at 06:12:53PM +0300, Eli Zaretskii wrote: > > Date: Sat, 28 Jun 2014 14:55:09 +0000 > > From: Alan Mackenzie > > Cc: 16526-done@debbugs.gnu.org > > This particular scan-lists which took 0.7s had to traverse 65 comments, > > of which 29 had an odd number of apostrophes. Scanning xdisp.c from BOB > > to syms_of_xdisp on my machine takes 0.024s. 28 * 0.024s = 0.67s. So if > > there were simple cacheing in syntax.c, such that the scan from BOB was > > done at most once for each scan-lists, the sluggishness would largely > > vanish in this case. > Sorry for asking the obvious: why cannot the code know that an > apostrophe inside a comment is just a simple character of no special > significance? Why does it need to treat apostrophes _inside_comments_ > specially? I think it's because whilst scanning backwards, it's not known that the comment ender actually ends a comment. For example: /* */ " /* " */ ^ | . Here we actually have a comment followed by a string followed by an unmated comment closer. If, at the marked position, we were to assume that the " was "nothing special", we'd mis-parse the above as a comment containing a quote mark, then get horribly confused trying to find the mating double quote mark for the first ". Or something like that. -- Alan Mackenzie (Nuremberg, Germany).