[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there something like `on-display-functions'?
From: |
Alan Mackenzie |
Subject: |
Re: Is there something like `on-display-functions'? |
Date: |
Wed, 27 Jan 2010 15:20:23 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, David,
On Wed, Jan 27, 2010 at 03:27:16PM +0100, David Kastrup wrote:
> Alan Mackenzie <address@hidden> writes:
> > 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)?
> > If there is, I could use it to apply the appropriate text properties
> > to C++ template delimiters as they're about to be displayed, thus
> > potentially speeding up startup for C++ (and like languages).
> > Yes, I've tried searching for it and not found it.
> (info "(elisp) Other display specs")
> You can make any display specification conditional. To do that,
> package it in another list of the form `(when CONDITION . SPEC)'. Then
> the specification SPEC applies only when CONDITION evaluates to a
> non-`nil' value. During the evaluation, `object' is bound to the
> string or buffer having the conditional `display' property. `position'
> and `buffer-position' are bound to the position within `object' and the
> buffer position where the `display' property was found, respectively.
> Both positions can be different when `object' is a string.
> Since CONDITION gets evaluated, you can use it for pretty much anything
> you like, even if you decide to let it result in nil always.
> That's pretty much butt-ugly but works. preview-latex uses this to
> prioritize its image rendering in order to have on-screen images
> rendered first.
Yep, that's utterly ghastly. ;-) Nevertheless, thanks muchly! Thanks
also for the XEmacs version (how did you guess I wanted that too?).
> --
> David Kastrup
--
Alan Mackenzie (Nuremberg, Germany).
- Re: Is there something like `on-display-functions'?, (continued)
- 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
Re: Is there something like `on-display-functions'?, Davis Herring, 2010/01/27
Re: Is there something like `on-display-functions'?, Daniel Colascione, 2010/01/27