From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Slawomir Nowaczyk Newsgroups: gmane.emacs.help Subject: Re: Is it possible to set different background for different modes? Date: Thu, 13 Oct 2005 16:05:42 +0200 Message-ID: <20051013160314.23F9.SLAWOMIR.NOWACZYK.847@student.lu.se> References: <1129207707.380328.50610@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1129212920 24221 80.91.229.2 (13 Oct 2005 14:15:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 Oct 2005 14:15:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 13 16:15:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EQ3nl-0006pN-B4 for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Oct 2005 16:11:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EQ3nk-000893-KM for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Oct 2005 10:11:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EQ3iT-0004FW-Ih for help-gnu-emacs@gnu.org; Thu, 13 Oct 2005 10:05:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EQ3iR-0004D3-5D for help-gnu-emacs@gnu.org; Thu, 13 Oct 2005 10:05:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EQ3iQ-0004Ck-TL for help-gnu-emacs@gnu.org; Thu, 13 Oct 2005 10:05:51 -0400 Original-Received: from [130.235.16.11] (helo=himmelsborg.cs.lth.se) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EQ3iQ-0001TF-JD for help-gnu-emacs@gnu.org; Thu, 13 Oct 2005 10:05:50 -0400 Original-Received: from [127.0.0.1] (slawek@dain [130.235.16.76]) by himmelsborg.cs.lth.se (8.12.11/8.12.11/perf-jw-tr) with ESMTP id j9DE5nST029205 for ; Thu, 13 Oct 2005 16:05:49 +0200 (CEST) Original-To: help-gnu-emacs@gnu.org In-Reply-To: <1129207707.380328.50610@g14g2000cwa.googlegroups.com> X-Esmandil_Citation: done X-Mailer-Plugin: Popup Memopad for Becky!2 Ver.0.02 Rev.2 X-Mailer: Becky! ver. 2.21.04 [en] 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:30200 Archived-At: On Thu, 13 Oct 2005 05:48:27 -0700 i.c.code@gmail.com wrote: #> Hi, #> #> I want to set different background for different modes at same time. #> For example, I open two window, one for perl and another for c, but I #> want them have different background colors. Is it possible? Everything is possible in Emacs ;) Something along those lines seems to work: (add-hook 'post-command-hook (lambda () (if (equal major-mode 'lisp-interaction-mode) (set-background-color "red") (set-background-color "green")))) Of course, post-command-hook gets executed after every command, so it may not be the best possible solution. -- Best wishes, Slawomir Nowaczyk ( slawomir.nowaczyk.847@student.lu.se ) Be nice to other people--they outnumber you six billion to one.