From 57c82a639b4612518a97305054a2b39d5bc430a6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 28 Aug 1994 20:00:21 +0000 Subject: [PATCH] (Fx_color_defined_p): Return list of RGB values, not just t. --- src/xfns.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/xfns.c b/src/xfns.c index e3eaf0cb513..b1c75d29f99 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2944,7 +2944,8 @@ even if they match PATTERN and FACE.") 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 @@ DEFUN ("x-color-defined-p", Fx_color_defined_p, Sx_color_defined_p, 1, 1, 0, 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; } -- 2.39.5