From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#22884: 25.0.92; C/l mode editing takes waaaayy too long Date: Fri, 4 Mar 2016 14:47:59 +0000 Message-ID: <20160304144759.GB2117@acm.fritz.box> References: <56D72C35.4090708@cs.ucla.edu> <20160303124910.GA2852@acm.fritz.box> <56D87A6E.8090202@cs.ucla.edu> <83povbz3mp.fsf@gnu.org> <56D8CC45.2090102@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1457102808 18898 80.91.229.3 (4 Mar 2016 14:46:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Mar 2016 14:46:48 +0000 (UTC) Cc: 22884@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 04 15:46:37 2016 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 1abr00-0005UI-8K for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Mar 2016 15:46:36 +0100 Original-Received: from localhost ([::1]:41553 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abqzz-0003dX-NK for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Mar 2016 09:46:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abqzY-00037O-0X for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 09:46:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abqzX-0005Qs-0J for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 09:46:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abqzS-0005PW-5O; Fri, 04 Mar 2016 09:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1abqzR-0007GM-U4; Fri, 04 Mar 2016 09:46:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 04 Mar 2016 14:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22884 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 22884-submit@debbugs.gnu.org id=B22884.145710273127879 (code B ref 22884); Fri, 04 Mar 2016 14:46:01 +0000 Original-Received: (at 22884) by debbugs.gnu.org; 4 Mar 2016 14:45:31 +0000 Original-Received: from localhost ([127.0.0.1]:60951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abqyx-0007Fa-IN for submit@debbugs.gnu.org; Fri, 04 Mar 2016 09:45:31 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:59580) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abqyv-0007FQ-Jg for 22884@debbugs.gnu.org; Fri, 04 Mar 2016 09:45:30 -0500 Original-Received: (qmail 51788 invoked by uid 3782); 4 Mar 2016 14:45:28 -0000 Original-Received: from acm.muc.de (p579E8D6B.dip0.t-ipconnect.de [87.158.141.107]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 04 Mar 2016 15:45:26 +0100 Original-Received: (qmail 12135 invoked by uid 1000); 4 Mar 2016 14:47:59 -0000 Content-Disposition: inline In-Reply-To: <56D8CC45.2090102@cs.ucla.edu> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:114393 Archived-At: Hello, Paul. On Thu, Mar 03, 2016 at 03:44:05PM -0800, Paul Eggert wrote: > On 03/03/2016 12:51 PM, Eli Zaretskii wrote: > > I'd rather we fixed CC Mode instead of "fixing" the > > sources it chokes on. > Me too, but I don't see a straightforward cc-mode fix for this. > Even if we come up with a fix, for some time we'll have the problem of > people using old versions of Emacs to look at the new Emacs source code. > And until there's a fix Emacs is reeeaally sluggish when editing > config.h at least. So I'd rather fix at least config.h, and (since I've > already done the work) I'm also mildly inclined to fix the other files > to be consistent, as in the attached patch (which also covers licenses > in the other .c and .h files). Thanks for the (new) patch. I've tried it out, and it appears to build and run just fine. I have had an idea for fixing Emacs so that we don't have this problem with parens in column 0. That is only to scan comments in the forward direction, and to mark them with text properties. `back_comment' will then be little more than checking these text properties are up to date, and then doing a backward text property search. > From c7c5fa7e01492963aab142d91b00cb872cb49686 Mon Sep 17 00:00:00 2001 > From: Paul Eggert > Date: Thu, 3 Mar 2016 15:42:28 -0800 > Subject: [PATCH] Rework C source files to avoid ^( > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > Work around Bug#22884 by rewording comments and strings to avoid ‘(’ > at the start of a line unless it starts a function. Although this > change is a hack and we should fix cc-mode’s performance for C files > that have ‘(’ at the start of a line in a comment or string, the > change does fix the immediate problem. > --- -- Alan Mackenzie (Nuremberg, Germany).