[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 22:27:49 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Hello, Eli.
On Thu, Mar 03, 2016 at 10:40:42PM +0200, Eli Zaretskii wrote:
> > Date: Thu, 3 Mar 2016 12:49:10 +0000
> > From: Alan Mackenzie <acm@muc.de>
> > Cc: 22884@debbugs.gnu.org
> > > 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.
> I think we should change syntax.c to fix this.
In particular, get syntax.c to recognise open parens in column zero as
defun starts _ONLY_ when they're not in strings or comments. This will
clearly impact performance to some (unknown) degree.
> (Alternatively, CC mode could stop depending on it, but I doubt this is
> a viable alternative.)
This was tried for some time, by internally binding
open-paren-in-column-0-is-defun-start to nil. It cost too much in
performance on large files (ask Martin!).
> We cannot really tell people we don't support such files, as they are
> valid C code.
I agree.
--
Alan Mackenzie (Nuremberg, Germany).
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, (continued)
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, Alan Mackenzie, 2016/03/08
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, Paul Eggert, 2016/03/09
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, John Wiegley, 2016/03/09
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, Paul Eggert, 2016/03/09
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, John Wiegley, 2016/03/09
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, Alan Mackenzie, 2016/03/09
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, Drew Adams, 2016/03/09
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, Alan Mackenzie, 2016/03/09
- bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, Drew Adams, 2016/03/09
bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, Eli Zaretskii, 2016/03/03
bug#22884: 25.0.92; C/l mode editing takes waaaayy too long, Stefan Monnier, 2016/03/14