* How does Emacs know the background color?
@ 2003-02-16 14:10 Michael Herman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Herman @ 2003-02-16 14:10 UTC (permalink / raw)
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.
--
Michael Herman
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How does Emacs know the background color?
[not found] <mailman.2005.1045404699.21513.help-gnu-emacs@gnu.org>
@ 2003-02-16 22:16 ` John Rabkin
2003-02-17 18:05 ` Kevin Rodgers
1 sibling, 0 replies; 4+ messages in thread
From: John Rabkin @ 2003-02-16 22:16 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How does Emacs know the background color?
[not found] <mailman.2005.1045404699.21513.help-gnu-emacs@gnu.org>
2003-02-16 22:16 ` John Rabkin
@ 2003-02-17 18:05 ` Kevin Rodgers
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2003-02-17 18:05 UTC (permalink / raw)
Michael Herman wrote:
> 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.
Check the window-system variable. But it would be better to check the specific
display characteristics you're interested in instead.
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: How does Emacs know the background color?
@ 2003-02-18 6:41 Zaretskii Eli
0 siblings, 0 replies; 4+ messages in thread
From: Zaretskii Eli @ 2003-02-18 6:41 UTC (permalink / raw)
This message was scanned for viruses and other malicious code by PrivaWall.
This mail was sent from ELTA SYS LTD.
> From: Michael Herman [mailto:michael-lists@thehermans.org]
> Sent: Sunday, February 16, 2003 4:11 PM
>
> 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?
It looks for an environment variable defined by xterm. See startup.el
for more details.
This message is processed by the PrivaWall Email Security Server.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-18 6:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-16 14:10 How does Emacs know the background color? Michael Herman
[not found] <mailman.2005.1045404699.21513.help-gnu-emacs@gnu.org>
2003-02-16 22:16 ` John Rabkin
2003-02-17 18:05 ` Kevin Rodgers
-- strict thread matches above, loose matches on Subject: below --
2003-02-18 6:41 Zaretskii Eli
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).