From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16526: 24.3.50; scroll-conservatively & c-mode regression Date: Sun, 29 Jun 2014 18:01:58 +0200 Message-ID: <53B03876.9070307__37286.2846278169$1404057819$gmane$org@gmx.at> References: <20140628130059.GA4144@acm.acm> <53AECA88.7010401@gmx.at> <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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1404057819 8442 80.91.229.3 (29 Jun 2014 16:03:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Jun 2014 16:03:39 +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 18:03: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 1X1HZi-0006Vh-64 for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Jun 2014 18:03:30 +0200 Original-Received: from localhost ([::1]:58213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1HZg-0005YD-Rs for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Jun 2014 12:03:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1HZW-0005Q3-6F for bug-gnu-emacs@gnu.org; Sun, 29 Jun 2014 12:03:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1HZO-0003hf-MC for bug-gnu-emacs@gnu.org; Sun, 29 Jun 2014 12:03:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1HZG-0003V5-5t; Sun, 29 Jun 2014 12:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X1HZF-0000J9-LH; Sun, 29 Jun 2014 12:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 29 Jun 2014 16:03: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.14040577321111 (code D ref 16526); Sun, 29 Jun 2014 16:03:01 +0000 Original-Received: (at 16526-done) by debbugs.gnu.org; 29 Jun 2014 16:02:12 +0000 Original-Received: from localhost ([127.0.0.1]:36934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1HYS-0000Hr-34 for submit@debbugs.gnu.org; Sun, 29 Jun 2014 12:02:12 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:64786) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1HYP-0000HW-FG for 16526-done@debbugs.gnu.org; Sun, 29 Jun 2014 12:02:10 -0400 Original-Received: from [62.47.250.54] ([62.47.250.54]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Lhwt0-1WFWWZ3Qgs-00n9Ek; Sun, 29 Jun 2014 18:02:01 +0200 In-Reply-To: <20140629144151.GD2948@acm.acm> X-Provags-ID: V03:K0:afpxF8scBjeeqnipx7uHjT0dVlgbnmZID79Vom014dHwgW169L2 l2hzYr4+ycLEdabNOBtt+2Ib/pvqrLxge1uFT2n6YSc2X1M8J3XDKA/PRNl5KkDv5ah5mUv 0HJVhmQ1jVMFIsYWMQE+kwFjvz0AiQmgWiAOeLY/k3MchBUX5i/4pWeot/yzRl8ccchX+X8 CnNX9lwsdOx0EMB6FSMZQ== 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:90966 Archived-At: > scan-lists, a primitive, must be utterly robust. syntax-ppss is too > fragile to be used here without a lot of hardening. > > syntax-ppss's cache is rendered invalid at any operation which changes > the syntax table (e.g. `modify-syntax-entry'), or changes to a different > syntax table (e.g. `with-syntax-table'), or when a syntax-table text > property/overlay is applied to the buffer, or even when a symbol's > property list is changed when that symbol is the value of a category > text property. CC Mode does all these things, and does all of them > apart from the first during run time, not merely at mode initialisation. How can any of these affect the cached start position of a defun before the position where the buffer contents were changed? > Also, the syntax-ppss cache's functioning is dependent upon > before-change-functions, which can be bound to nil by any program at any > time. There's an appropriate advice what to do in such case. > If one were to harden syntax-ppss against all these things, one would > probably end up calculating the cache from scratch every time, in > effect. Can you give an example? > scan-lists is a primitive, and must function correctly regardless of any > trickery which might be played on it. You can easily play trickery on `scan-lists' if you start it within a comment or string. So `syntax-ppss' is at least as primitive as `scan-lists' (especially when the latter is used with negative COUNT). Anyway, IIUC this implies that CC mode can't work with `syntax-ppss' at all. If that is true, then `open-paren-in-column-0-is-defun-start' was indeed the last resort that made editing larger files possible. martin