unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "John Rabkin" <yoni-r@actcom.com>
Subject: Re: How does Emacs know the background color?
Date: Mon, 17 Feb 2003 00:16:38 +0200	[thread overview]
Message-ID: <pan.2003.02.16.22.16.38.502155@actcom.com> (raw)
In-Reply-To: mailman.2005.1045404699.21513.help-gnu-emacs@gnu.org

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	other threads:[~2003-02-16 22:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2005.1045404699.21513.help-gnu-emacs@gnu.org>
2003-02-16 22:16 ` John Rabkin [this message]
2003-02-17 18:05 ` How does Emacs know the background color? Kevin Rodgers
2003-02-18  6:41 Zaretskii Eli
  -- strict thread matches above, loose matches on Subject: below --
2003-02-16 14:10 Michael Herman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pan.2003.02.16.22.16.38.502155@actcom.com \
    --to=yoni-r@actcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).