all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: 12853@debbugs.gnu.org
Subject: bug#12853: 24.2.50; doc of `color-defined-p'
Date: Sat, 10 Nov 2012 10:12:34 -0800	[thread overview]
Message-ID: <7DA4A38C21E342A8A4061EC7D8257556@us.oracle.com> (raw)
In-Reply-To: <83d2zlxs8g.fsf@gnu.org>

> > 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.






  reply	other threads:[~2012-11-10 18:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-10 16:46 bug#12853: 24.2.50; doc of `color-defined-p' Drew Adams
2012-11-10 17:50 ` Eli Zaretskii
2012-11-10 18:12   ` Drew Adams [this message]
2012-11-10 18:33     ` Eli Zaretskii
2012-11-10 18:56       ` Drew Adams
2012-11-10 19:17         ` Eli Zaretskii
2012-11-10 19:51           ` Drew Adams
2012-11-10 20:25             ` Eli Zaretskii
2012-11-23  7:56 ` Chong Yidong

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=7DA4A38C21E342A8A4061EC7D8257556@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=12853@debbugs.gnu.org \
    --cc=eliz@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.