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

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

Re: Different background color for different windows/modes


From: tomas
Subject: Re: Different background color for different windows/modes
Date: Thu, 29 Jun 2017 13:40:24 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Jun 29, 2017 at 03:45:31AM -0700, Alexandre Oberlin wrote:
> Hi all, I am using a hook to change my background color using stuff like:
> (add-hook 'change-major-mode-hook 'change-my-background-color)
> 
> This is sub-optimal because 
> - there is a terrible flash as soon as I enter the minibuffer
> - all the displayed windows change color (not only the one getting focus). 
> 
> How can I have different colors for different window  modes?  If currently 
> impossible, is something planned in that regard? Or maybe xemacs does this?

You don't state it explicitly, but I assume you want to change
the background color per buffer, perhaps per window.

For a long time it was only possible to set the whole frame's
(an Emacs frame is what the window manager considers a "window")
background color. This has changed since Emacs 24-ish, see for
example

  
https://stackoverflow.com/questions/3094638/emacs-custom-background-color-by-mode

(this seems to be exactly what you're looking for).

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAllU5ygACgkQBcgs9XrR2kYSgACfT8hG9yXfeclPQwLOGU5O7KEo
3McAniy9SLPfXdCYcsnZW2Xl+4HvM2rN
=OkVt
-----END PGP SIGNATURE-----



reply via email to

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