diff options
| author | Eli Zaretskii | 2008-10-21 11:23:57 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-10-21 11:23:57 +0000 |
| commit | ef164dbc4ee9992f9a42a3ddc77d77a44abaea8f (patch) | |
| tree | ff2b0ae2a71d7bedb1ff34581939851bc254b3ff | |
| parent | acc8b598b0bca62a6a06f495dc77139ea674c671 (diff) | |
| download | emacs-ef164dbc4ee9992f9a42a3ddc77d77a44abaea8f.tar.gz emacs-ef164dbc4ee9992f9a42a3ddc77d77a44abaea8f.zip | |
(High-Level Completion): Document `read-color'.
| -rw-r--r-- | doc/lispref/minibuf.texi | 22 |
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 | ||
| 1271 | This function reads a string that is a color specification, either the | ||
| 1272 | color's name or an RGB hex value such as @code{#RRRGGGBBB}. It | ||
| 1273 | prompts with @var{prompt} (default: @code{"Color (name or #R+G+B+):"}) | ||
| 1274 | and provides completion for color names, but not for hex RGB values. | ||
| 1275 | In addition to names of standard colors, completion candidates include | ||
| 1276 | the foreground and background colors at point. | ||
| 1277 | |||
| 1278 | Valid RGB values are described in @ref{Color Names}. | ||
| 1279 | |||
| 1280 | The function's return value is the color name typed by the user in the | ||
| 1281 | minibuffer. However, when called interactively or if the optional | ||
| 1282 | argument @var{convert} is non-@code{nil}, it converts the name into | ||
| 1283 | the color's RGB value and returns that value as a string. If an | ||
| 1284 | invalid color name was specified, this function signals an error, | ||
| 1285 | except that empty color names are allowed when @code{allow-empty} is | ||
| 1286 | non-@code{nil} and the user enters null input. | ||
| 1287 | |||
| 1288 | Interactively, or when @var{display} is non-@code{nill}, the return | ||
| 1289 | value 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}, |
| 1272 | and @code{read-input-method-name}, in @ref{Input Methods}. | 1294 | and @code{read-input-method-name}, in @ref{Input Methods}. |