emacs-devel
[Top][All Lists]
Advanced

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

Re: diary font-lock issue


From: Stefan Monnier
Subject: Re: diary font-lock issue
Date: Wed, 17 May 2006 11:11:13 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> This all seems very complex. According to:

> <http://lists.gnu.org/archive/html/emacs-devel/2006-04/msg00881.html>

> "the font-lock-multiline property should be enough in all cases to
> make it unnecessary to use an after-change-function hook."

That's true.  His after-change-function is not needed.

> That's a long thread, but AFAICS, it seems that for simple keyword
> fontification, setting font-lock-multiline for the buffer ought to be
> enough.

No.  font-lock-multiline (just like after-change-functions) only help with
the re-fontification of multiline keywords.  The problem you're facing is
the one of initial detection of a multiline keyword.

> (Indeed, the fancy diary buffer is not something one edits, so this is
> about as simple as multiline font-lockign can get.)

Actually the initial detection of multiline keywords is the hard part, not
the re-fontification after a buffer change.

Note that a workaround for your problem is to turn off jit-lock (you can do
so buffer-locally by setting font-lock-support-mode to nil).


        Stefan





reply via email to

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