emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs -q -nw --color=never


From: Eli Zaretskii
Subject: Re: emacs -q -nw --color=never
Date: Mon, 22 Sep 2003 18:48:13 +0200

> From: Richard Stallman <address@hidden>
> Date: Mon, 22 Sep 2003 05:05:10 -0400
> 
> It sounds like a bug to me.  Judging from the manual, --color=never is
> supposed to completely prevent Emacs from displaying colors, even if a
> Lisp program specifies colors.

That's true, although a Lisp program should never specify colors
unless the display supports them; it should instead specify faces, and
faces are computed based on color capabilities.  But Info does work
like this: it specifies faces, not explicit colors.

> It would appear to be completely broken.  Can you debug it?

I did debug this a bit.  AFAICS, this happens because this code in
line 2130 of term.c:

  NATNUMP (color_mode)

evaluates to zero (i.e. false) when the value of color_mode is -1.
The value of -1 is correct: that's the association of `never' in
tty-color-mode-alist, and set_tty_color_mode, where this code belongs,
is called with its second argument `val' being the symbol `never'.

Sorry, I don't have enough time to figure out why NATNUMP doesn't do
what it was supposed to do here.  FWIW, "cvs annotate" says that this
code didn't change since when I first wrote it, so perhaps it's my
original sin, although I'm quite sure I tested `never' at the time.




reply via email to

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