Mercurial > emacs
changeset 8655:4c69fcaaa037
(Fx_color_defined_p): Return list of RGB values, not just t.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 28 Aug 1994 20:00:21 +0000 |
parents | 0334c1b51e87 |
children | 0c076c714598 |
files | src/xfns.c |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfns.c Sun Aug 28 19:59:18 1994 +0000 +++ b/src/xfns.c Sun Aug 28 20:00:21 1994 +0000 @@ -2944,7 +2944,8 @@ DEFUN ("x-color-defined-p", Fx_color_defined_p, Sx_color_defined_p, 1, 1, 0, - "Return t if the current X display supports the color named COLOR.") + "Return non-nil if the X display supports the color named COLOR.\n\ +The value is actually a list of integer RGB values--(RED GREEN BLUE).") (color) Lisp_Object color; { @@ -2954,7 +2955,14 @@ CHECK_STRING (color, 0); if (defined_color (XSTRING (color)->data, &foo)) - return Qt; + { + Lisp_Object rgb[3]; + + rgb[0] = make_number (foo.red); + rgb[1] = make_number (foo.green); + rgb[2] = make_number (foo.blue); + return Flist (3, rgb); + } else return Qnil; }