[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: Thu, 28 Jan 2010 21:18:05 +0200

> Date: Thu, 28 Jan 2010 14:47:07 +0000
> Cc: address@hidden, address@hidden
> From: Alan Mackenzie <address@hidden>
> > >    (defun foo-before-display (buffer beg end) .....)
> > > , BEG and END defining the piece of BUFFER about to be displayed.
> > > The hook would be called before fontification.
> > What do you mean by ``before fontification'', and why does it have to
> > be before that?
> I don't really know what I mean by "before fontification".  I want it so
> that if in `foo-before-display' I put syntax-table TP on < and >, and
> point happens to be at one of them, show-paren-mode will work to
> highlight them.

Why do you need to do that only when the text is about to be
displayed?  Is it too expensive to do that in the whole buffer or

Anyway, show-paren-mode works off an idle timer, so I think it is
not necessary to run the kind of function you have in mind before
redisplay; near its end is okay.

> Maybe an alternative to a hook here would be to allow an application to
> specify that some text property (say, 'c-templatified) is to be
> "special", and when the displayer detects the TP has changed, it calls an
> associated function.  'c-templatified would be analogous to 'fontified.

Don't we already have text properties that cause Lisp forms to be

And again, why can't you put your text property everywhere in the
buffer where you want this effect?

reply via email to

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