[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How to prevent font-lock (& jit-lock etc.) from refontifying?
From: |
Drew Adams |
Subject: |
RE: How to prevent font-lock (& jit-lock etc.) from refontifying? |
Date: |
Wed, 13 Oct 2004 10:22:38 -0700 |
Thanks for your replies. Does anyone know if it is true that font-lock
provides no way to prevent it from refontifying in the way I described? I'm
thinking there must be a (simple) way that I'm ignorant of. I can't believe
that they (we) would change font-lock in a way that lets it impose itself so
completely.
-----Original Message-----From: Kevin Rodgers
Sacha Chua wrote:
> "Drew Adams" <drew.adams@oracle.com> writes:
> > In Emacs 21, suppose that I apply a face to certain spans of text.
Maybe the
> > buffer is already font-locked before doing this, maybe not. In either
case,
> > I want these spans of text to show the face I apply, overriding any
> > font-lock highlighting that might be there.
>
> One workaround would be to use overlays instead, as overlays override
> font properties. Not the answer you're looking for, but might be
> helpful...
Another technique I've used to work around this problem is to set the
category property instead of the face property:
(put 'foo 'face 'foo-face)
(put-text-property start end 'category 'foo)