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

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

Re: different background colours in different emacs windows.


From: Tim X
Subject: Re: different background colours in different emacs windows.
Date: Sat, 26 Mar 2011 10:52:03 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

"Filippo A. Salustri" <salustri@ryerson.ca> writes:

> Hi,
> I was wondering: can one set the background-color of the active window to be
> different from that of other, inactive windows?
> I've thought that adding to default-frame-alist something like
> (background-color . ("white" "black")) would have worked, but aquamacs just
> goes away (never opens a frame) if I do that.
>
> I'm running aquamacs 2.2 on OSX 10.6.6.
>
> Anyone got any advice?
> Cheers.
> Fil Salustri

I don't think this can be done - at least not easily. I think more recent
versions of emacs do support the ability to set faces on a per buffer
basis, but as far as I know, there is no mechanism to change a face
based on changes in the buffer status i.e. active v inactive. I guess
you would need to find an appropriate hook that runs when the buffer
changes state and then add some code which sets the default background.
Alternatively, jit-lock-register may be worth looking at. I suspect the
problem will be that for efficiency reasons, when emacs is switching
buffers, it will not do any font-locking on the buffer your switching
from. However, this is all just a guess and may be completely wrong.

I can see how such a feature may be useful - maybe worth putting in a
feature request/whishlist item to the emacs devels

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

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