aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2008-10-21 11:23:57 +0000
committerEli Zaretskii2008-10-21 11:23:57 +0000
commitef164dbc4ee9992f9a42a3ddc77d77a44abaea8f (patch)
treeff2b0ae2a71d7bedb1ff34581939851bc254b3ff
parentacc8b598b0bca62a6a06f495dc77139ea674c671 (diff)
downloademacs-ef164dbc4ee9992f9a42a3ddc77d77a44abaea8f.tar.gz
emacs-ef164dbc4ee9992f9a42a3ddc77d77a44abaea8f.zip
(High-Level Completion): Document `read-color'.
-rw-r--r--doc/lispref/minibuf.texi22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index e846fe2727c..22224221cce 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -1267,6 +1267,28 @@ but uses the predicate @code{user-variable-p} instead of
1267@end example 1267@end example
1268@end defun 1268@end defun
1269 1269
1270@deffn Command read-color &optional prompt convert allow-empty display
1271This function reads a string that is a color specification, either the
1272color's name or an RGB hex value such as @code{#RRRGGGBBB}. It
1273prompts with @var{prompt} (default: @code{"Color (name or #R+G+B+):"})
1274and provides completion for color names, but not for hex RGB values.
1275In addition to names of standard colors, completion candidates include
1276the foreground and background colors at point.
1277
1278Valid RGB values are described in @ref{Color Names}.
1279
1280The function's return value is the color name typed by the user in the
1281minibuffer. However, when called interactively or if the optional
1282argument @var{convert} is non-@code{nil}, it converts the name into
1283the color's RGB value and returns that value as a string. If an
1284invalid color name was specified, this function signals an error,
1285except that empty color names are allowed when @code{allow-empty} is
1286non-@code{nil} and the user enters null input.
1287
1288Interactively, or when @var{display} is non-@code{nill}, the return
1289value is also displayed in the echo area.
1290@end deffn
1291
1270 See also the functions @code{read-coding-system} and 1292 See also the functions @code{read-coding-system} and
1271@code{read-non-nil-coding-system}, in @ref{User-Chosen Coding Systems}, 1293@code{read-non-nil-coding-system}, in @ref{User-Chosen Coding Systems},
1272and @code{read-input-method-name}, in @ref{Input Methods}. 1294and @code{read-input-method-name}, in @ref{Input Methods}.