[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C mode fontification took 50 seconds
From: |
Alan Mackenzie |
Subject: |
Re: C mode fontification took 50 seconds |
Date: |
1 May 2007 20:39:01 +0200 |
Date: |
Tue, 1 May 2007 21:00:09 +0100 |
User-agent: |
Mutt/1.5.9i |
Hi, Richard!
On Sat, Apr 28, 2007 at 02:35:30PM -0400, Richard Stallman wrote:
> Using the latest version of Emacs 22 files, in a 48-line Linux console,
> I visited the file xdisp.c and typed C-u 23402 C-n.
> Then I typed C-v and waited.
>
> After it had gone on for 30 seconds, I stopped the process and looked
> at it with GDB. xbacktrace gives c-syntactic-skip-backward,
> c-in-knr-argdecl, c-beginning-of-decl-1, further up
> c-beginning-of-defun, further up, c-parse-state,
> c-font-lock-complex-decl-prepare. This was called
> from font-lock-fontify-keywords-region.
> It looks like c-in-knr-argdecl has the infinite loop.
> After I continued, it eventually finished, but yuck!
> This is reproducible.
I don't have this problem.
I made a change to CC Mode on 2007-04-09 to make C-x n d
(`narrow-to-defun') and friends do the right thing. This involved
changing some macros; all users of the macros therefore needed
recompiling.
Here, again, is the recipe for recompiling the CC Mode sources:
(i) M-x byte-compile-file cc-defs.el. M-x load-file /path/cc-defs.elc
(ii) M-x byte-compile-file cc-langs.el. M-x load-file /path/cc-langs.elc
(iii) M-x byte-compile-file cc-engine.el. M-x load-file ../cc-engine.elc
(iv) M-x byte-compile-file cc-mode.el. M-x load-file ../cc-mode.elc
(v) compile and load cc-{awk,cmds}.el (no dependence on the other four
files).
Either do that, or recompile the entire lot off cc-*.el. If that
doesn't fix things, please say so.
--
Alan Mackenzie (Munich, Germany)