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

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

Re: Is it possible to set different background for different modes?


From: Slawomir Nowaczyk
Subject: Re: Is it possible to set different background for different modes?
Date: Thu, 13 Oct 2005 16:05:42 +0200

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.





reply via email to

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