emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

custom type `color'


From: Drew Adams
Subject: custom type `color'
Date: Sat, 28 Oct 2006 15:11:51 -0700

The Elisp manual (node Simple Types) says this about :type `color':

     "The value must be a valid color name, and you can do completion
     with `M-<TAB>'.  A sample is provided."

1. Just where you can do this M-TAB completion needs to be explained. This
is apparently only for the value edit field in Customize.

2. I don't see that "a sample is provided". That is, I see no samples for
picking a color by completing its name. (This comes right after explaining
about completion.) The only sample I see is the usual one in Customize -
after the value is completed; that is, the kind of sample you see for colors
(e.g. face attributes). The doc is a bit misleading now. The sample is
obvious, once you're in Customize - it is better to say nothing about it
here, to avoid misunderstanding.

3. It is not true that "the value must be a valid color name", if by color
name is meant a name in `defined-colors'. RGB strings such as #FFF000333 are
OK also. This should be made clear.

4. Nothing prevents you from setting the value to any string whatsoever, say
"Tuscaloosa", which corresponds to no defined color. The doc should say that
if the value does not correspond to a defined color (either a color name or
an #RGB string), then the value is _____ (what is it?). I'm not sure what
the default color value is based on (default-frame-alist default?); it seems
to be black in emacs -Q.

5. Something should be said about the fact that hitting RET in the edit
field means you are prompted for the color, and in that case you can use
normal minibuffer completion (TAB, not M-TAB) for the name. This is a second
kind of completion, initiated in a different way. Whatever is currently in
the edit field is ignored for this completion, BTW - you start over from
scratch. That should be explained, and the edit field should be cleared at
that time (it is not cleared).

6. New feature request (after release) -

Allow `set-variable' to also take advantage of completion for such a color
value. This would be non-strict completion, so that you could enter a
non-name value such as #FFF000333. Or, better, the completion predicate
should allow any string that is either a defined color name or a valid #RGB
string, but nothing else.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]