[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: Thu, 28 Jan 2010 10:14:40 +0000
User-agent: Mutt/1.5.9i

Hi, Daniel!

On Wed, Jan 27, 2010 at 08:41:27PM -0500, Daniel Colascione wrote:
> On 1/27/10 8:57 AM, Alan Mackenzie 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)?

> > 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).

> Wouldn't that do the wrong thing if, say, the first half of a template
> argument list is at the bottom of the visible portion of the buffer,
> and I want to jump to its end?

No.  :-)  I'm intending to mark the template delimiters ONLY in pairs
from now on.  This is due to difficulties with the current approach,
which is to mark an opening < when it looks like a template opener.

It is rarely (?never) necessary to look very far for a matching >, since
a <..> pair can never enclose a ;, {, or } [*].  The "never" might happen
when you type a < shortly before an infinite number of #define lines.
But C++ hackers don't really use #define, do they?  ;-)

[*] Any rough estimate of how large the gap between < and > gets in real
C++ programs would be welcome.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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