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: Sun, 29 Jun 2014 17:39:15 -0400 Message-ID: References: <20140205230001.GB3381@acm.acm> <8338jw230j.fsf@gnu.org> <83wqc8sxd2.fsf@gnu.org> <20140625213206.GA3604@acm.acm> <20140627203416.GA4395@acm.acm> <20140628130059.GA4144@acm.acm> <20140628173334.GB2632@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1404078043 16362 80.91.229.3 (29 Jun 2014 21:40:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Jun 2014 21:40: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 Sun Jun 29 23:40:32 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 1X1Mpr-0005yD-E3 for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Jun 2014 23:40:31 +0200 Original-Received: from localhost ([::1]:59202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1Mpq-0007v7-U2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Jun 2014 17:40:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1Mpe-0007oW-7s for bug-gnu-emacs@gnu.org; Sun, 29 Jun 2014 17:40:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1MpW-0005BS-Iu for bug-gnu-emacs@gnu.org; Sun, 29 Jun 2014 17:40:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1MpO-000514-Ph; Sun, 29 Jun 2014 17:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X1MpO-0002xL-6g; Sun, 29 Jun 2014 17:40: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: Sun, 29 Jun 2014 21:40:02 +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.140407796411299 (code D ref 16526); Sun, 29 Jun 2014 21:40:02 +0000 Original-Received: (at 16526-done) by debbugs.gnu.org; 29 Jun 2014 21:39:24 +0000 Original-Received: from localhost ([127.0.0.1]:37036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1Mok-0002w2-KB for submit@debbugs.gnu.org; Sun, 29 Jun 2014 17:39:23 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:8458) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1Moj-0002vo-Fb for 16526-done@debbugs.gnu.org; Sun, 29 Jun 2014 17:39:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69914766" Original-Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Jun 2014 17:39:15 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 4A2AC66138; Sun, 29 Jun 2014 17:39:15 -0400 (EDT) In-Reply-To: <20140628173334.GB2632@acm.acm> (Alan Mackenzie's message of "Sat, 28 Jun 2014 17:33:34 +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:90976 Archived-At: > No, syntax-ppss wouldn't do here without considerable modification. Why? > scan-lists must be utterly robust. syntax-ppss can get confused if the > user changes the syntax-table, Indeed, the user shouldn't change the syntax-table ;-) > or adds systax-table text properties, The user should do that via syntax-propertize. > or binds before-change-functions to nil and makes a change. User gets what she deserves. Binding inhibit-modification-hooks while making changes is dangerous, but binding before-change-functions to nil is simply evil and asking for trouble. > How about simply (tm) find-defun-start actually determining a defun > start (when open-paren-..-defun is nil) the first time it is called for > an invocation of scan-lists, then remembering this position for > subsequent use? That's indeed what syntax-ppss would do. But if the syntax-table may change (or added as text-properties, or if before-change-functions is let-bound to nil while making modifications), any such mechanism is bound to fail because in those cases it shouldn't "remember this position for subsequent use". > As an enhancement, which would work well for scan-lists at top level > with a large negative COUNT, we could keep a list of top level positions > during the initial scan, say every ~5k characters. (Or even store the > actual parse states every 5k characters exactly.) You're describing syntax-ppss. Stefan