[Top][All Lists]

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

Re: new text property

From: Colin Walters
Subject: Re: new text property
Date: 10 Jun 2002 01:46:22 -0400

On Mon, 2002-06-10 at 00:29, Stephen J. Turnbull wrote:

> Er, as I understood that thread, the rationale is that font-lock is
> too heavy (aka "slow and broken") to be used by modes that just want
> some "light-weight" highlighting.  Is that not so?  Are there other
> advantages to not using font-lock to do font-locking?<wink>

The font-lock you are thinking of is regexp and search-based
fontification, both of which can be slow (and in the case of regexps
quite often broken).  

But typing 'M-x font-lock-mode' is a nice *interface* to enabling and
disabling fontification.  It doesn't mean the mode has to use regexp or
search-based fontification.  In Emacs we now have "font-core.el", which
just defines the bare bones of `font-lock-mode' and
`global-font-lock-mode'.  It allows a mode (like `occur') which uses the
new `font-lock-face' to allow its fontification to be toggled via M-x
font-lock-mode, without loading all of the regexp and other machinery of

> I think we should look into allowing all highlighting to be done by
> font-lock by making font-lock performance better.  

The performance of `font-lock-face' in Emacs is essentially equivalent
to that of the `face' property; i.e. it is not an issue.  I suspect you
could easily achieve the same results in XEmacs.

reply via email to

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