unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Problem with font-lock when opening a buffer
@ 2004-05-05 20:57 Javier Oviedo
  2004-05-05 21:18 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Javier Oviedo @ 2004-05-05 20:57 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with font-lock when opening a buffer
  2004-05-05 20:57 Problem with font-lock when opening a buffer Javier Oviedo
@ 2004-05-05 21:18 ` Stefan Monnier
  2004-05-06 14:21   ` Javier Oviedo
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2004-05-05 21:18 UTC (permalink / raw)


> 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:
[...]
> Loading semantic-c...done

Have you tried it without Semantic?


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with font-lock when opening a buffer
  2004-05-05 21:18 ` Stefan Monnier
@ 2004-05-06 14:21   ` Javier Oviedo
  0 siblings, 0 replies; 3+ messages in thread
From: Javier Oviedo @ 2004-05-06 14:21 UTC (permalink / raw)


Actually, I figured out what my problem was.
I had a function that I added to the c-mode-common-hook. This function
contained about 10 different requires and some other stuff. Every time I
opened a c-file this was apparently doing "something" that caused the
fortifying...

Instead of doing through the function and add-hook, I simply run this
function once when emacs starts and now I see no delay whatsoever.

Thanks for the help, anyway. Take care.

-- 
Javier


"Stefan Monnier" <monnier@iro.umontreal.ca> wrote in message
news:jwvsmeepobm.fsf-monnier+gnu.emacs.help@gnu.org...
> > 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:
> [...]
> > Loading semantic-c...done
>
> Have you tried it without Semantic?
>
>
>         Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-06 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-05 20:57 Problem with font-lock when opening a buffer Javier Oviedo
2004-05-05 21:18 ` Stefan Monnier
2004-05-06 14:21   ` Javier Oviedo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).