[Top][All Lists]
[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: |
Stefan Monnier |
Subject: |
Re: First fontification of a buffer happens before font lock is fully initialised. |
Date: |
Sun, 05 Feb 2012 20:39:00 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
>> 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 only see one other way to deal with this: that is to write
> `font-lock-mode' explicitly; or rather, expand the macro by hand, tidy it
> up, and move the `run-hooks'.
Moving away from define-minor-mode is also something I'd rather avoid
(so we don't have to update font-lock-mode every time we change
define-minor-mode).
Some other thoughts:
- use some trick to delay the fontification to after the minor-mode hook
is run (e.g. add to post-command-hook or something like that).
post-command-hook is not a good choice and I can't think of much
better, so maybe this is out.
- maybe it's OK to add yet another argument to define-minor-mode.
Note that an arg that says "turn off this standard thingy" (as
in :no-hook) is out of the question, since a large part of the reason
why we have define-minor-mode is to try and auto-enforce the coding
conventions of minor modes. But maybe we can have an :after-hook.
Some major modes would also appreciate such a feature, so maybe this
same arg can be added to both define-minor-mode and
define-derived-mode.
Stefan
- Re: First fontification of a buffer happens before font lock is fully initialised., Alan Mackenzie, 2012/02/04
- Re: First fontification of a buffer happens before font lock is fully initialised.,
Stefan Monnier <=
- Re: First fontification of a buffer happens before font lock is fully initialised., Alan Mackenzie, 2012/02/07
- Re: First fontification of a buffer happens before font lock is fully initialised., Stefan Monnier, 2012/02/07
- Re: First fontification of a buffer happens before font lock is fully initialised., Alan Mackenzie, 2012/02/08
- Re: First fontification of a buffer happens before font lock is fully initialised., Stefan Monnier, 2012/02/10
- Re: First fontification of a buffer happens before font lock is fully initialised., Alan Mackenzie, 2012/02/23
- Re: First fontification of a buffer happens before font lock is fully initialised., Stefan Monnier, 2012/02/23