all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: Alexandre Oberlin <alxobr@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Different background color for different windows/modes
Date: Thu, 29 Jun 2017 13:40:24 +0200	[thread overview]
Message-ID: <20170629114024.GB24776@tuxteam.de> (raw)
In-Reply-To: <e2881894-3574-4c3b-8297-9b0e8660e056@googlegroups.com>

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



  parent reply	other threads:[~2017-06-29 11:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 10:45 Different background color for different windows/modes Alexandre Oberlin
2017-06-29 11:24 ` Emanuel Berg
2017-06-29 11:40 ` tomas [this message]
2017-07-23 13:53 ` Alexandre Oberlin
2017-07-23 17:10   ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170629114024.GB24776@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=alxobr@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.