[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there something like `on-display-functions'?
From: |
Eli Zaretskii |
Subject: |
Re: Is there something like `on-display-functions'? |
Date: |
Wed, 27 Jan 2010 19:55:29 +0200 |
> Date: Wed, 27 Jan 2010 15:37:33 +0000
> From: Alan Mackenzie <address@hidden>
> Cc: Lennart Borgman <address@hidden>, address@hidden
>
> On Wed, Jan 27, 2010 at 10:11:27AM -0500, Stefan Monnier wrote:
> > >> Is there some hook called each time something's about to be
> > >> displayed on the screen (regardless of whether or not font-lock is
> > >> enabled)?
>
> > There's fontification-functions, which is the hook around which
> > jit-lock is implemented.
>
> Thanks for this tip.
>
> The documentation (elisp manual) and doc string for this are poor. They
> only say what you should use the hook for, not when it's called. In
> particular, they don't say explicitly what happens when font lock isn't
> enabled, or when a different font-lock-support-mode is active. I take it
> the hook is called regardless of these things.
Yes, it's called regardless. It's actually part of the normal
redisplay operation, whereby Emacs traverses the visible portion of
every buffer that is displayed in some window, and does whatever is
necessary to redisplay it. During this traverse, the display code
stops at each buffer position which has some change in text properties
or overlays, and calls the handler appropriate for whatever that
buffer position needs. (Well, actually it calls all the possible
handlers, and those which have nothing to do simply return
immediately.) The handler for the `fontified' property is the one
that runs from fontification-functions, if that value's property at
current position is nil. The only other setting that stops Emacs from
running fontification-functions is that run-hooks is nil (not sure why
this is so, but the code is quite explicit).
- Re: Is there something like `on-display-functions'?, (continued)
- Re: Is there something like `on-display-functions'?, Alan Mackenzie, 2010/01/28
- Re: Is there something like `on-display-functions'?, Eli Zaretskii, 2010/01/28
- Re: Is there something like `on-display-functions'?, Alan Mackenzie, 2010/01/28
- Re: Is there something like `on-display-functions'?, Eli Zaretskii, 2010/01/28
- Re: Is there something like `on-display-functions'?, Alan Mackenzie, 2010/01/29
- Re: Is there something like `on-display-functions'?, Stefan Monnier, 2010/01/28
- Re: Is there something like `on-display-functions'?, Alan Mackenzie, 2010/01/29
- Re: Is there something like `on-display-functions'?, Stefan Monnier, 2010/01/29
- Re: Is there something like `on-display-functions'?, Alan Mackenzie, 2010/01/29
- Re: Is there something like `on-display-functions'?, Stefan Monnier, 2010/01/30
- Re: Is there something like `on-display-functions'?,
Eli Zaretskii <=
- Re: Is there something like `on-display-functions'?, Alan Mackenzie, 2010/01/28
- Doc patch for `fontification-functions': [was: Is there something like `on-display-functions'?], Alan Mackenzie, 2010/01/28
- Re: Doc patch for `fontification-functions':, Chong Yidong, 2010/01/28
- Re: Doc patch for `fontification-functions':, Alan Mackenzie, 2010/01/28
- Re: Doc patch for `fontification-functions': [was: Is there something like `on-display-functions'?], Eli Zaretskii, 2010/01/28
- Re: Doc patch for `fontification-functions':, Stefan Monnier, 2010/01/28
Re: Is there something like `on-display-functions'?, alin.s, 2010/01/27
Re: Is there something like `on-display-functions'?, David Kastrup, 2010/01/27