bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22884: 25.0.92; C/l mode editing takes waaaayy too long


From: Alan Mackenzie
Subject: bug#22884: 25.0.92; C/l mode editing takes waaaayy too long
Date: Fri, 4 Mar 2016 14:47:59 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

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@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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]