From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: Changing background color of an emacs window Date: Thu, 22 May 2008 09:12:28 -0700 (PDT) Organization: http://groups.google.com Message-ID: <23f1d399-5bf7-41ea-b1e1-9b56450aa222@g16g2000pri.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1211474514 23128 80.91.229.12 (22 May 2008 16:41:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 May 2008 16:41:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 22 18:42:30 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JzDry-0005Zj-OC for geh-help-gnu-emacs@m.gmane.org; Thu, 22 May 2008 18:42:23 +0200 Original-Received: from localhost ([127.0.0.1]:40817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzDrE-00048Q-Dg for geh-help-gnu-emacs@m.gmane.org; Thu, 22 May 2008 12:41:36 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!g16g2000pri.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 24.6.97.120 Original-X-Trace: posting.google.com 1211472749 27649 127.0.0.1 (22 May 2008 16:12:29 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 22 May 2008 16:12:29 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g16g2000pri.googlegroups.com; posting-host=24.6.97.120; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.18, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:158869 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54235 Archived-At: On May 22, 8:25 am, Corey Foote wrote: =C2=ABWhen 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?=C2=BB 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 =E2=88=91 http://xahlee.org/ =E2=98=84