From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christian Schlauer Newsgroups: gmane.emacs.devel Subject: Re: ps-print-color-p and the background colour of Emacs' frame Date: Tue, 07 Aug 2007 23:44:27 +0200 Message-ID: References: <46A0F18B.1080108@ig.com.br> <46A76AB1.8060807@ig.com.br> <46B6352F.1060604@ig.com.br> Reply-To: cs-usenet@arcor.de NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186523442 10026 80.91.229.12 (7 Aug 2007 21:50:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Aug 2007 21:50:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 07 23:50:39 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IIWwo-00070F-OW for ged-emacs-devel@m.gmane.org; Tue, 07 Aug 2007 23:50:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIWwm-00074t-Sq for ged-emacs-devel@m.gmane.org; Tue, 07 Aug 2007 17:50:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IIWwj-00074L-6F for emacs-devel@gnu.org; Tue, 07 Aug 2007 17:50:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IIWwh-00073y-N6 for emacs-devel@gnu.org; Tue, 07 Aug 2007 17:50:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIWwh-00073t-Ii for emacs-devel@gnu.org; Tue, 07 Aug 2007 17:50:31 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IIWwf-0004Kb-TC for emacs-devel@gnu.org; Tue, 07 Aug 2007 17:50:30 -0400 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1IIWwD-0005en-VX for emacs-devel@gnu.org; Tue, 07 Aug 2007 23:50:01 +0200 Original-Received: from finn.gmane.org ([80.91.229.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Aug 2007 23:50:01 +0200 Original-Received: from cs-usenet by finn.gmane.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Aug 2007 23:50:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 75 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: finn.gmane.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76165 Archived-At: Vinicius Jose Latorre 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