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: Thu, 3 Mar 2016 12:49:10 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Paul.

On Wed, Mar 02, 2016 at 10:08:53AM -0800, Paul Eggert wrote:
> I've been noticing this problem for a bit and figured it'd get fixed but 
> it hasn't so here is a bug report.

> With the Emacs 25 pretests, it takes waaaaayyy too long to edit some C 
> code. To reproduce the problem use the attached file (taken from the 
> Emacs source code) and run:

> emacs -Q config.h
> M-x goto-line RET 1661 RET / /

> On my six-year-old desktop the second '/' takes about 10 seconds to 
> echo.  This sort of thing makes Emacs effectively unusable for editing 
> config.h.

The problem is in config.h.  At line 14, inside a comment, appears the
following string:
    "(at your option) any later version."
.  The open paren is at column zero, so the fancy code in syntax.c then
fails to recognise the comment as a comment.  CC Mode is then
effectively communicating across the continent between L1661 and L14 by
carrier pigeon in the belief that there is non-syntactic-ws code at L14.
(Syntactic whitespace includes comments and preprocessor constructs.)

Inserting a backslash at the beginning of L14 solves the problem, as
does setting open-paren-in-column-0-is-defun-start to nil.

The next problem is that there are around 324 occurrences of "(" at
column zero in the src directory, and quite a few in lib and lib-src.
Most of them are in comments, some of them are parameter lists, and some
of them (e.g. in lisp.h) are wierd constructs of some sort.  These
contravene GNU coding standards and really need sorting out.

> In GNU Emacs 25.0.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.7)
>   of 2016-03-02 built on penguin.cs.ucla.edu
> Repository revision: 100346aa226e4eacc56f390c099bb9aab585b5f4
> Windowing system distributor 'Fedora Project', version 11.0.11800000
> Configured using:
>   'configure --enable-gcc-warnings'

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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