From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#12853: 24.2.50; doc of `color-defined-p' Date: Sat, 10 Nov 2012 10:12:34 -0800 Message-ID: <7DA4A38C21E342A8A4061EC7D8257556@us.oracle.com> References: <10495ABA26F14041A1E374AC3B820F6E@us.oracle.com> <83d2zlxs8g.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1352571179 1879 80.91.229.3 (10 Nov 2012 18:12:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Nov 2012 18:12:59 +0000 (UTC) Cc: 12853@debbugs.gnu.org To: "'Eli Zaretskii'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 10 19:13:08 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TXFYH-0003Kh-KU for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Nov 2012 19:13:05 +0100 Original-Received: from localhost ([::1]:56737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXFY8-0002R7-6L for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Nov 2012 13:12:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXFY3-0002R2-Tt for bug-gnu-emacs@gnu.org; Sat, 10 Nov 2012 13:12:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXFY0-0006NQ-RN for bug-gnu-emacs@gnu.org; Sat, 10 Nov 2012 13:12:51 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXFY0-0006NM-OI for bug-gnu-emacs@gnu.org; Sat, 10 Nov 2012 13:12:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TXFYE-0003tK-Ey for bug-gnu-emacs@gnu.org; Sat, 10 Nov 2012 13:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Nov 2012 18:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12853-submit@debbugs.gnu.org id=B12853.135257118014950 (code B ref 12853); Sat, 10 Nov 2012 18:13:02 +0000 Original-Received: (at 12853) by debbugs.gnu.org; 10 Nov 2012 18:13:00 +0000 Original-Received: from localhost ([127.0.0.1]:59755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TXFYC-0003t5-49 for submit@debbugs.gnu.org; Sat, 10 Nov 2012 13:13:00 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:27557) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TXFY9-0003sx-BB for 12853@debbugs.gnu.org; Sat, 10 Nov 2012 13:12:58 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qAAICflB018967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 10 Nov 2012 18:12:42 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qAAICfbm028188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Nov 2012 18:12:41 GMT Original-Received: from abhmt104.oracle.com (abhmt104.oracle.com [141.146.116.56]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qAAICefh011758; Sat, 10 Nov 2012 12:12:40 -0600 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 10 Nov 2012 10:12:40 -0800 X-Mailer: Microsoft Office Outlook 11 In-reply-to: <83d2zlxs8g.fsf@gnu.org> Thread-Index: Ac2/a9uVV88xW128T4K+Xjhu6KEecgAAFuPQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: 0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-Spam-Score: 0.4 (/) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org 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 Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:66734 Archived-At: > > It should say that the string can be any string, and that > > the function returns non-nil for #1 or #2, and nil otherwise: > > > > 1. a defined (recognized) color name > > 2. a color RGB code, with prefix `#' > > > > The doc should not say anything about the particular strings > > "unspecified-fg" or "unspecified-bg": there is nothing special about > > them. The function returns nil for ANY string other than #1 or #2. > > They _are_ special, because they are recognized color names. Fine, then change #1 to "a defined color name other than `unspecified-fg' and `unspecified-bg'". However, I do not see either of those names returned by `defined-colors', which has the same handling of optional arg FRAME as `color-defined-p'. Perhaps that function does include those two names sometimes, under some circumstances? Dunno - you tell me. If so, then the exceptional treatment of these two pseudo color names (recognized as colors sometimes, in some contexts) seems like an ugly kludge. If so, and if the kludge is kept, then, by all means, feel free to make the minor correction cited above. In that case, please also mention in the doc that "defined color" is determined by function `defined-colors', i.e., if it is the case that `defined-colors' can in fact sometimes include these pseudocolors in its return value. Mentioning that might help users navigate the messy exceptionalism. In that case, too, the doc of `defined-colors' should be corrected to mention these weird exceptions. Perhaps it can call out the circumstances under which these noncolors are included in its return value. On the other hand, if `defined-colors' in fact always DTRT - never returns those noncolors, then the doc for `color-defined-p' should say just what I stated originally. You can simply add that "defined color" here is per `defined-colors'. IOW, in this case, there is no need to mention these noncolors, because they do not fit #1 or #2.