help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect window switches?


From: Eli Zaretskii
Subject: Re: Detect window switches?
Date: Fri, 27 Sep 2013 09:01:55 +0300

> From: Stefan Monnier <address@hidden>
> Date: Thu, 26 Sep 2013 16:27:04 -0400
> 
> Well the event is `redisplay', and indeed if we had
> a before-redisplay-hook, we could use it to do that in Lisp (although
> we'd bump into another problem: faces can't be set per-window.

The way to do that is with face remapping, although that is per
buffer, not per window.  But I don't think this is relevant to the
issue at hand, as the OP has an overlay to handle that.  He just wants
to know when to put the overlay and when to remove it.

> Tho maybe with a redisplay-window-hook we could trick the display into
> using different face settings for different windows).

I don't think redisplay-window-hook would help in this case, but if it
will, so will an idle timer, since the code that runs off that hook
will simply sample the situation at more or less regular intervals.
Doing that from a timer is probably an approximation that is "good
enough".



reply via email to

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