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: Sat, 28 Jun 2014 16:00:40 +0200 Message-ID: <53AECA88.7010401__5319.04615131697$1403964100$gmane$org@gmx.at> References: <20140202192007.GB5365@acm.acm> <831tzl44ox.fsf@gnu.org> <20140205230001.GB3381@acm.acm> <8338jw230j.fsf@gnu.org> <83wqc8sxd2.fsf@gnu.org> <20140625213206.GA3604@acm.acm> <20140627203416.GA4395@acm.acm> <20140628130059.GA4144@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 1403964100 19885 80.91.229.3 (28 Jun 2014 14:01:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Jun 2014 14:01:40 +0000 (UTC) Cc: 16526-done@debbugs.gnu.org To: Alan Mackenzie , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 28 16:01:30 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 1X0tC4-00021I-SL for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jun 2014 16:01:28 +0200 Original-Received: from localhost ([::1]:54799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0tC4-0002NK-EM for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jun 2014 10:01:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0tBt-0002N8-QV for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2014 10:01:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0tBm-0007Y4-6t for bug-gnu-emacs@gnu.org; Sat, 28 Jun 2014 10:01:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0tBe-0007X3-9N; Sat, 28 Jun 2014 10:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X0tBd-0002Wy-PA; Sat, 28 Jun 2014 10:01: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: Sat, 28 Jun 2014 14:01: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.14039640549705 (code D ref 16526); Sat, 28 Jun 2014 14:01:01 +0000 Original-Received: (at 16526-done) by debbugs.gnu.org; 28 Jun 2014 14:00:54 +0000 Original-Received: from localhost ([127.0.0.1]:36249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0tBV-0002WT-Jh for submit@debbugs.gnu.org; Sat, 28 Jun 2014 10:00:54 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:62674) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X0tBS-0002WC-EQ for 16526-done@debbugs.gnu.org; Sat, 28 Jun 2014 10:00:51 -0400 Original-Received: from [178.191.141.58] ([178.191.141.58]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LbyUS-1WHh0f0erk-00jGku; Sat, 28 Jun 2014 16:00:41 +0200 In-Reply-To: <20140628130059.GA4144@acm.acm> X-Provags-ID: V03:K0:hZ7jnLRjmsK3krcWoqDvTQCvbDbNbqpEryKPQOTHvZR5Rds+bkw byJEIbz+SQQ6XQJl31HIWvPvnruSNU2NpLC3NrriA20s38La0H38f0Ng4pfgp++xdq7nF+n J7fZJFiYqOVW/6Yyn+3FIUDJe9Uekx5788Es/diSmhneLYqDZcLT7dyok2aBTnxsuovMunm kh1LWmZD0H/IvFW4GC8Ug== 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:90936 Archived-At: > AH!!!!! GOT IT!!!! What causes the slowdown is binding > open-paren-in-column-0-is-defun-start to nil around the scan-lists. In > CC Mode's "engine" parts, that variable is bound to nil. There are good > reasons for this (which I can't precisely recall just at the moment). > > In CC Mode, "'" has string syntax. So any C comment with an odd number > of apostrophes looks, to back_comment, like it has an "unbalanced string", > and the code ends up at label lossage: in back_comment. Here > find_defun_start is called, and this returns BOB when open-paren-..-0 is > nil. From here (BOB) the code scans forward to check this putative > "unbalanced string". It's a long way from BOB to ~900k, hence the > sluggishness. > > Where do we go from here? In every version of Emacs I'm actually doing some work I have disabled CC mode's `open-paren-in-column-0-is-defun-start' bindings. Otherwise, working on a file like xdisp.c would be virtually impossible for me. As for the release I would simply do what I proposed earlier - make these overriding bindings customizable. So someone who wants to comment out code with a paren in the first column can have the "correct" behavior while people like me can continue work with "incorrect" but yet tame behavior. And obviously I could continue to work without having bzr status tell me that I've changed CC mode files ;-) martin