Problem with font-lock when opening a buffer

From:

Javier Oviedo

Subject:

Problem with font-lock when opening a buffer

Date:

Wed, 5 May 2004 16:57:59 -0400

Hello all:
I asked this question a few months ago, but no one responded. I'm hoping to
have a little better luck this time. :-)
It emacs takes a long time to load/open a c-mode file, especially if there
are already existing c-mode buffers in emacs. The problem/issue is two fold:
1. When I load a c-mode buffer(.c, .h, etc), emacs attempts to fontify the
buffer several seperate times before actually displaying it. I don't think
that is normal behavior but please correct me if I am wrong. Could there be
something in my configuration that is causing this?
2. The bigger issue is that when I load the file, emacs goes through each
c-mode buffer already open and fontifies it. This can take quite a bit of
time if I have many files open, which is most often the case. Some times I
wait as long as 5-7 seconds from the time that I "open" a file to the time
that it actually displays. This is quite annoying.
I can see in the mode-line as emacs goes one by one fontifying my c-mode
buffers before loading the file desired. Below is the output of the
*Message* buffer with my notes interleaved.
Can someone please help me out here?? Thanks in advance!!!
******** No files have been loaded in emacs yet.
******** Now loading file siuprd.c
Loading cc-mode...done
Fontifying siuprd.c... (regexps.......................)
Loading cc-mode...done
Fontifying siuprd.c... (regexps.......................)
Loading cc-mode...done
Fontifying siuprd.c... (regexps.........................)
Loading cc-mode...done
Loading semantic-c...done
Mark set [2 times]
******** Now loading file pvppack.h
Note: file is write protected
Fontifying pvppack.h... (regexps.......................)
Note: file is write protected
Fontifying siuprd.c... (regexps.........................)
Note: file is write protected
Fontifying pvppack.h... (regexps.........................)
Note: file is write protected
Mark set [2 times]
******** Now loading file rcutxrx.c
Reading view properties...done
Fontifying rcutxrx.c... (regexps.......................)
Note: file is write protected
Fontifying pvppack.h... (regexps.........................)
Note: file is write protected
Fontifying siuprd.c... (regexps.........................)
Note: file is write protected
Fontifying rcutxrx.c... (regexps.........................)
Note: file is write protected
Mark set [2 times]
--
Javier