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: Mon, 27 Jan 2014 09:21:24 +0100 Message-ID: <52E61704.6050807__2554.54476359791$1390810966$gmane$org@gmx.at> References: <838uu4cq11.fsf@gnu.org> <52E3D131.2090705@gmx.at> <83r47wausm.fsf@gnu.org> <52E3EAC2.2040100@gmx.at> <83lhy4as2l.fsf@gnu.org> <52E4019C.5080905@gmx.at> <83k3dnc3rl.fsf@gnu.org> <83iot7c3bq.fsf@gnu.org> <52E4EF61.3050404@gmx.at> <831tzubqxw.fsf@gnu.org> <20140126204310.GA3937@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 1390810953 12855 80.91.229.3 (27 Jan 2014 08:22:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jan 2014 08:22:33 +0000 (UTC) Cc: 16526@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 27 09:22:39 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 1W7hSp-0006Q4-A6 for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jan 2014 09:22:39 +0100 Original-Received: from localhost ([::1]:58297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7hSo-0007Va-TT for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jan 2014 03:22:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7hSY-0007Gi-3F for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 03:22:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7hSQ-0003hg-QP for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 03:22:22 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7hSF-0003fm-Kx; Mon, 27 Jan 2014 03:22:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W7hSF-0006Xz-Ci; Mon, 27 Jan 2014 03:22:03 -0500 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: Mon, 27 Jan 2014 08:22:03 +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.139081089625102 (code B ref 16526); Mon, 27 Jan 2014 08:22:03 +0000 Original-Received: (at 16526) by debbugs.gnu.org; 27 Jan 2014 08:21:36 +0000 Original-Received: from localhost ([127.0.0.1]:37328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7hRn-0006Wn-Jb for submit@debbugs.gnu.org; Mon, 27 Jan 2014 03:21:35 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:56578) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7hRk-0006Wd-C3 for 16526@debbugs.gnu.org; Mon, 27 Jan 2014 03:21:33 -0500 Original-Received: from [62.47.55.74] ([62.47.55.74]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0M2t0Q-1VFSCT1tKQ-00sfkd for <16526@debbugs.gnu.org>; Mon, 27 Jan 2014 09:21:31 +0100 In-Reply-To: <20140126204310.GA3937@acm.acm> X-Provags-ID: V03:K0:kzlulSBL0i0/EMuGxRgoynvZNXbIbcSsfuEKppAmhT+QJowK/45 0Py9kijPFupfw/Bi84KmBqycFsXrYOBaau5hiofIkd3w9ao+N1s79SG3+SeAsHCJtx4RaVu +8ZEJPD1Ltvb7ko1+OIuj7sgLy5vF86lHOz1nU3Yirj1dkhgvErXUjizi6WcM0xIV8Er6A5 JE4xXc0UymNKpLeTfurZA== 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:84096 Archived-At: > The @dfn{state cache}, a list of certain brace/paren/bracket positions > around some position, is set for a position near EOB. With the switch to > a different position, CC Mode tweaks the state cache rather than > calculating it anew starting at BOB. When the new position is nearer > BOB, the code searches backwards for the appropriate braces. However, it > shouldn't be scanning the entire buffer backwards. There is clearly a > bug here. In my scenario `end-of-buffer' should already have produced the complete state cache. How else would you have been able to fontify code near EOB correctly? > The backward scan-lists calls will be causing continual forward searches > from BOB in syntax.c, every time the backward scan hits a comment ender. IIUC now any call to `forward-comment' with a negative argument will automatically go to BOB unless it's already there. How else could it determine that it's not called from a position within a comment? So if you decide to bind `open-paren-in-column-0-is-defun-start' to nil, then why don't you build the state cache anew from BOB? In any case, please provide an option say `c-open-paren-in-column-0-is-defun-start' which people can set to avoid those scans. The doc-string should mention that things like Michael's commented out code are handled correctly iff this option is nil and that long delays while working with c-mode can be sometimes avoided by setting this option to t. The default value could be obviously nil. martin