GNU bug report logs - #22884
25.0.92; C/l mode editing takes waaaayy too long

Previous Next

Packages: emacs, cc-mode;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Wed, 2 Mar 2016 18:10:01 UTC

Severity: normal

Tags: moreinfo

Found in version 25.0.92

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 22884 <at> debbugs.gnu.org
Subject: bug#22884: 25.0.92; C/l mode editing takes waaaayy too long
Date: Fri, 4 Mar 2016 14:47:59 +0000
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 <eggert <at> cs.ucla.edu>
> 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).




This bug report was last modified 3 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.