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

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

Re: How does Emacs know the background color?


From: John Rabkin
Subject: Re: How does Emacs know the background color?
Date: Mon, 17 Feb 2003 00:16:38 +0200
User-agent: Pan/0.13.0 (The whole remains beautiful)

On Sun, 16 Feb 2003 08:10:38 +0000, Michael Herman wrote:

> I am using a special mode for handling e-mail called post.el.  In post.el
> there are different faces depending on the background being 'light' or
> 'dark'.  When I launch emacs -nw from within an xterm with a white
> background, emacs uses the face for a dark background.
> 
> How does emacs determine what the background is?
> 
> When I use -rv for the xterm, emacs still thinks the background is dark.
> 
> On a sort of related note, is there a way to tell how emacs was launched
> from the command line?  I'd like to modify my .emacs to change settings
> depending on whether I used emacs -nw or not.
> 
> Thanks.

I'm a newbie myself. The first thing I ever wrote (2 weeks ago) in elisp was:

(defun reversed_colors () 
  "Sets the background to black and the foreground to white"
  (set-background-color "black")
  (set-foreground-color "white")
  )

(if (equal window-system 'x) 
    (reversed_colors)
  )

It's in my ~/.emacs file and works fine.

> How does emacs determine what the background is?

Try evaluating (set-background-color "black")

-- 
"Cut your own wood and it will warm you twice"
        Regards, Yoni Rabkin



reply via email to

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