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

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

Re: Changing background color of an emacs window


From: Xah
Subject: Re: Changing background color of an emacs window
Date: Thu, 22 May 2008 09:12:28 -0700 (PDT)
User-agent: G2/1.0

On May 22, 8:25 am, Corey Foote <coreyfo...@hotmail.com> wrote:
«When an Emacs frame is split into several windows, is there a way to
change the background color (and perhaps other visual properties) of
one window without changing the others?»

I'm not aware a mode or default way to do it. But what you can do is
write a function that changes current window bg color, to the post-
command-hook.

(defun change-bg-color-on-split ()
  (let ((cmd this-command))
    (when (string-equal cmd "split-window-vertically")
      (set-background-color "#ffe4c4"))))

(add-hook 'post-command-hook 'change-bg-color-on-split)

Code untested, but something like that... you'll need to mod the code
so that it changes to diff colors on each split, and perhaps also code
to change back whenever there's unsplit...

  Xah
  xah@xahlee.org
∑ http://xahlee.org/

reply via email to

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