all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christian Schlauer <cs-muelleimer-rubbish.bin@arcor.de>
To: emacs-devel@gnu.org
Subject: Re: ps-print-color-p and the background colour of Emacs' frame
Date: Tue, 07 Aug 2007 23:44:27 +0200	[thread overview]
Message-ID: <f9ap3c$89i$1@sea.gmane.org> (raw)
In-Reply-To: 46B6352F.1060604@ig.com.br

Vinicius Jose Latorre <viniciusjl@ig.com.br> 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

  reply	other threads:[~2007-08-07 21:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-05 20:22 ps-print-color-p and the background colour of Emacs' frame Christian Schlauer
2007-07-20 17:31 ` Vinicius Jose Latorre
2007-07-23 18:54   ` Christian Schlauer
2007-07-25 15:22     ` Vinicius Jose Latorre
2007-08-05 20:19       ` Christian Schlauer
2007-08-05 20:38         ` Vinicius Jose Latorre
2007-08-07 21:44           ` Christian Schlauer [this message]
2007-08-08 16:42             ` Vinicius Jose Latorre
2007-08-18  7:50               ` Christian Schlauer

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

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

  git send-email \
    --in-reply-to='f9ap3c$89i$1@sea.gmane.org' \
    --to=cs-muelleimer-rubbish.bin@arcor.de \
    --cc=cs-usenet@arcor.de \
    --cc=emacs-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.