From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Devon Sean McCullough Newsgroups: gmane.emacs.bugs Subject: color-gray-p Date: Sun, 22 Aug 2004 01:36:25 -0400 (EDT) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200408220536.i7M5aPkF085855@grant.org> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1093153045 16674 80.91.224.253 (22 Aug 2004 05:37:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Aug 2004 05:37:25 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 22 07:37:16 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Byl2a-0003BM-00 for ; Sun, 22 Aug 2004 07:37:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Byl6y-0003W2-1T for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Aug 2004 01:41:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Byl6v-0003VW-04 for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2004 01:41:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Byl6u-0003VD-6R for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2004 01:41:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Byl6u-0003VA-4F for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2004 01:41:44 -0400 Original-Received: from [206.190.173.18] (helo=grant.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Byl2A-0007N1-OQ for bug-gnu-emacs@gnu.org; Sun, 22 Aug 2004 01:36:50 -0400 Original-Received: from grant.org (localhost [127.0.0.1]) by grant.org (8.12.11/8.12.11) with ESMTP id i7M5aQRU085913 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 22 Aug 2004 01:36:30 -0400 (EDT) (envelope-from devon@grant.org) Original-Received: (from devon@localhost) by grant.org (8.12.11/8.12.11/Submit) id i7M5aPkF085855; Sun, 22 Aug 2004 01:36:25 -0400 (EDT) (envelope-from devon) Original-To: bug-gnu-emacs@gnu.org X-Virus-Scanned: by amavisd-new X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:8771 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:8771 In GNU Emacs 21.3.3 (i386-unknown-freebsd4.8, X toolkit, Xaw3d scroll bars) of 2003-06-08 on grant.org Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: (color-gray-p "gray") signals (wrong-type-argument framep nil) Functions `color-gray-p' and `color-supported-p' do not work as documented. See patch to xfaces.c below which seems to correct the trouble although much is obscure to me, e.g. the second parameter of CHECK_* is a total mystery. Recent input: ( c o l o r - g r ESC TAB SPC " g r a y " ) C-j ESC x r e p o r t SPC e m SPC SPC RET Recent messages: (emacs -q) For information about the GNU Project and its goals, type C-h C-p. eval: Loading debug...done Entering debugger... [2 times] Loading emacsbug...done --- emacs-21.3/src/xfaces.c.~1~ Thu Nov 14 08:15:48 2002 +++ emacs-21.3/src/xfaces.c Fri Aug 20 13:22:13 2004 @@ -1476,15 +1476,17 @@ { struct frame *f; - CHECK_FRAME (frame, 0); CHECK_STRING (color, 0); + if (NILP (frame)) + frame = selected_frame; + CHECK_FRAME (frame, 0); f = XFRAME (frame); return face_color_gray_p (f, XSTRING (color)->data) ? Qt : Qnil; } DEFUN ("color-supported-p", Fcolor_supported_p, - Scolor_supported_p, 2, 3, 0, + Scolor_supported_p, 1, 3, 0, "Return non-nil if COLOR can be displayed on FRAME.\n\ BACKGROUND-P non-nil means COLOR is used as a background.\n\ If FRAME is nil or omitted, use the selected frame.\n\ @@ -1494,8 +1496,10 @@ { struct frame *f; - CHECK_FRAME (frame, 0); CHECK_STRING (color, 0); + if (NILP (frame)) + frame = selected_frame; + CHECK_FRAME (frame, 0); f = XFRAME (frame); if (face_color_supported_p (f, XSTRING (color)->data, !NILP (background_p))) return Qt;