From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16526: 24.3.50; scroll-conservatively & c-mode regression Date: Wed, 02 Jul 2014 21:57:23 -0400 Message-ID: References: <20140628145509.GB4144@acm.acm> <53AFD1FA.5010201@gmx.at> <20140629091757.GA2948@acm.acm> <53AFE536.7010407@gmx.at> <20140629124829.GC2948@acm.acm> <53B02042.1050107@gmx.at> <20140629144151.GD2948@acm.acm> <53B03876.9070307@gmx.at> <20140629174953.GE2948@acm.acm> <53B117D6.1050306@gmx.at> <20140702200522.GB3823@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1404352723 1628 80.91.229.3 (3 Jul 2014 01:58:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jul 2014 01:58:43 +0000 (UTC) Cc: 16526-done@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 03 03:58:36 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 1X2WID-0006AH-AC for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Jul 2014 03:58:33 +0200 Original-Received: from localhost ([::1]:57274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2WIC-0001uK-OX for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Jul 2014 21:58:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2WI2-0001uA-ET for bug-gnu-emacs@gnu.org; Wed, 02 Jul 2014 21:58:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2WHr-0002uy-0a for bug-gnu-emacs@gnu.org; Wed, 02 Jul 2014 21:58:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2WHi-0002uF-Qf; Wed, 02 Jul 2014 21:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X2WHi-00075E-2w; Wed, 02 Jul 2014 21:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Thu, 03 Jul 2014 01:58: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-done@debbugs.gnu.org id=D16526.140435265227163 (code D ref 16526); Thu, 03 Jul 2014 01:58:01 +0000 Original-Received: (at 16526-done) by debbugs.gnu.org; 3 Jul 2014 01:57:32 +0000 Original-Received: from localhost ([127.0.0.1]:40908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2WHE-000741-CJ for submit@debbugs.gnu.org; Wed, 02 Jul 2014 21:57:32 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:17032) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2WHC-00073j-3c for 16526-done@debbugs.gnu.org; Wed, 02 Jul 2014 21:57:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWFgoDBQsLDiYSFBgNJDGHUwjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWFgoDBQsLDiYSFBgNJDGHUwjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="75862577" Original-Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Jul 2014 21:57:23 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id AF3AD61E04; Wed, 2 Jul 2014 21:57:23 -0400 (EDT) In-Reply-To: <20140702200522.GB3823@acm.acm> (Alan Mackenzie's message of "Wed, 2 Jul 2014 20:05:22 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) 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:91127 Archived-At: > No. The particular rogue invocation of scan-lists which caused this > (sub-)thread scans from BOB to near EOB 29 times. Inside scan-lists, > _NO_ changes to syntax-tables, s-t text properties etc. are possible. > What I'm suggesting is that cacheing that first scan from BOB will be a > big win for many time-consuming scan-listses. Here's the situation: we can add some special code to handle your case. But adding code which will use syntax-ppss would be more beneficial for 99% of the major modes. Adding a cache that only works within a single scan-lists instance is too much trouble for too little gain. Adding a cache that is flushed less often means either it will suffer from the same limitations as syntax-ppss (so we may as well use syntax-ppss), or it needs to additionally hook into the text-property and set-syntax-table code to be flushed in those extra corner cases, and there again these extra checks will be only useful for those rare modes like CC-mode and will be at best harmless and in some cases detrimental to performance compared to simply using syntax-ppss. IOW, using syntax-ppss for find_defun_start is The Right Thing to do. And CC-mode should then be fixed to take advantage of it. Stefan