help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntax Highlighting Latency in Emacs


From: Pierre-Charles David
Subject: Re: Syntax Highlighting Latency in Emacs
Date: Mon, 13 Dec 2004 10:35:24 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)

jab3 <manual@helpdesk.org> writes:

> I don't want to start a war or anything (because it probably has something
> to do with my system), but I am curious about something I've noticed with
> Emacs as compared with vim.  If I'm looking at a source code file in vim,
> (and it doesn't even have to be that large - maybe a few thousand K) the
> syntax highlighting is automatic.  And if I edit something, which changes
> the highlighting of the rest of the file, it is instantaneous.  But in
> Emacs, there is a 2 or 3 second delay in the updating of the highlighting. 
> Is there a setting I'm missing somewhere?  (I'm new to Emacs, and I am
> trying to move to it instead of vim for serious editing)  Has anyone else
> noticed this?

The font-locking system supports different modes of operation, which
determine when fontification occurs. On my system (GNU Emacs 21.3) the
default is `jit-lock-mode', with `jit-lock-stealth-time' set to 3. The
doc says:

  "Stealthy buffer fontification if `jit-lock-stealth-time' is
  non-nil. This means remaining unfontified areas of buffers are
  fontified if Emacs has been idle for `jit-lock-stealth-time'
  seconds, while Emacs remains idle. This is useful if any buffer has
  any deferred fontification."

This would be consistent with the behaviour you describe. Check the
variables `font-lock-support-mode', `jit-lock-mode' and
`jit-lock-stealth-time' variables, and try different values.

-- 
Pierre-Charles David (pcdavid <at> emn <dot> fr)
Computer Science PhD Student, Ecole des Mines de Nantes, France
Homepage: http://pcdavid.net/


reply via email to

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