emacs-devel
[Top][All Lists]
Advanced

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

Re: First fontification of a buffer happens before font lock is fully in


From: Alan Mackenzie
Subject: Re: First fontification of a buffer happens before font lock is fully initialised.
Date: Thu, 26 Jan 2012 10:58:25 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jan 25, 2012 at 08:43:48PM -0500, Stefan Monnier wrote:

> jit-lock postpones fontification to whenever the text is actually
> displayed, i.e. much later than initialization; it may very well never
> fontify any part of the text at all, if the buffer is never displayed.

Ah, OK.

> > So do you agree that the code should be changed so that
> > fontification always happens after running the mode-hook?

> Yes, I agree.  This was the behavior in Emacs-20, and is also the
> behavior with jit-lock (i.e. the default behavior).  I'm not sure what's
> the best way to get that result, tho: adding yet-another keyword to
> define-minor-mode is something I'd rather avoid.

I can understand that.  How about writing `font-lock-mode' explicitly
rather than using `define-minor-mode'?  The explicit fontification of the
whole buffer could be removed from jit-lock (?and lazy-lock) since it
will be redundant, and possibly because that explicit fontification might
somehow depend on something in font-lock-mode-hook.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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