[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Changing background color of an emacs window
From: |
Corey Foote |
Subject: |
RE: Changing background color of an emacs window |
Date: |
Thu, 22 May 2008 20:59:06 -0400 |
Hello Lennart,Thank you! I really appreciate this code that you have
contributed.However, I do have a few questions. I'm a newbie when it comes to
Emacs Lisp, but is your code missing the read-color function? When I invoke
buffer-bg-set-color interactively I get a message in the mini-buffer saying,
"Symbol's function definition is void: read-color." I'm running GNU Emacs
22.1.50.1.Also when I call the function by saying, for example,
(buffer-bg-set-color "blue" "test-buffer") in the scratch buffer in invoke it
with C-x C-e, it applies the color to the scratch buffer itself and not to the
test-buffer buffer like I had wanted.- Corey> Date: Thu, 22 May 2008 23:36:42
+0200> From: lennart.borgman@gmail.com> To: xahlee@gmail.com> CC:
help-gnu-emacs@gnu.org> Subject: Re: Changing background color of an emacs
window> > Xah wrote:> > 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)> > > Unfortunately that does not change the bg color
of the whole Emacs > frame, not just the current Emacs window.> > There has
been a little bit talk about implementing background colors > etc per buffer on
Emacs devel, but so far no one has done anything to > implement it as far as I
know.> > There is one workaround, I just added this to EmacsWiki> >
http://www.emacswiki.org/cgi-bin/wiki/BufferBackgroundColor> >
_________________________________________________________________
Keep your kids safer online with Windows Live Family Safety.
http://www.windowslive.com/family_safety/overview.html?ocid=TXT_TAGLM_WL_Refresh_family_safety_052008