[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ps-print-color-p and the background colour of Emacs' frame
From: |
Christian Schlauer |
Subject: |
Re: ps-print-color-p and the background colour of Emacs' frame |
Date: |
Tue, 07 Aug 2007 23:44:27 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Vinicius Jose Latorre <address@hidden> writes:
> Christian Schlauer wrote:
[...]
>> There is only an inaccurate doc string:
>>
>> ,----[ C-h v ps-default-bg RET ]
>> | It's used only when `ps-print-color-p' is non-nil.
>> `----
>>
>> Correct is "It's used only when `ps-print-color-p' is not nil or
>> black-white." -- see below:
>>
>
> Humm, isn't black-white a non-nil (not nil) value?
>
>
>> ,----[ C-h v ps-print-color-p RET ]
>> | ps-print-color-p is a variable defined in `ps-print.el'.
>> | | Valid values are:
>> | | nil Do not print colors.
>> | | t Print colors.
>> | | black-white Print colors on black/white printer.
>> | | Any other value is treated as t.
>> | | You can customize this variable.
>> `----
`black-white' is a non-nil value, but ps-default-bg isn't used when
ps-print-color-p is `black-white' -- the following is tested with
Emacs 22.1.50:
| ps-print-color-p | Background colour in PS file when |
| | `ps-default-bg' is `frame-parameter? |
|------------------+--------------------------------------|
| t | yes |
| black-white | no |
| nil | no |
So the doc-string of ps-default-bg *could* say "It is used iff
`ps-print-color-p' is t."
But there is this nasty "Any other value is treated as t." in the
doc-string of ps-print-color-p, as quoted above. That suggests that
the only way to *avoid* the background colour in the PS file is to set
ps-print-color-p to `nil' or `black-white' -- if I set it to `foo',
that would be treated as t according to the doc-string. That's why I
ended up with the above formulation. My suggestions are:
1. Either write "It is used unless `ps-print-color-p' is nil or
black-white." in the doc-string of ps-default-bg (I tested that,
see the table above) or
2. get rid of the "Any other value is treated as t." in the doc-string
of ps-print-color-p.
It seems to me that (2) makes most sense: I can't seem to set
ps-print-color-p to anything else than t/black-white/nil. I tried
M-x set-variable RET ps-print-color-p RET foo RET
and
M-x set-variable RET ps-print-color-p RET 4 RET
but that doesn't work. And
M-x customize-variable RET ps-print-color-p RET
shows a `Value Menu' consisting of t/black-white/nil. So how could the
user set it to any other value?
--
Christian Schlauer