# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1250761446 0 # Node ID c1f72ea59c482e825e2a1bfc6ec1cea425c44cfd # Parent a6ffc3555448802193d9e85e53da4f98b3ef18bb (Fxw_color_values): Return 3-element list. Doc fix. diff -r a6ffc3555448 -r c1f72ea59c48 src/nsfns.m --- a/src/nsfns.m Thu Aug 20 07:11:54 2009 +0000 +++ b/src/nsfns.m Thu Aug 20 09:44:06 2009 +0000 @@ -2232,16 +2232,12 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, - doc: /* Return a description of the color named COLOR. -The value is a list of integer RGBA values--(RED GREEN BLUE ALPHA). -These values appear to range from 0 to 65280; white is (65280 65280 65280 0). -The optional argument FRAME is currently ignored. */) + doc: /* Internal function called by `color-values', which see. */) (color, frame) Lisp_Object color, frame; { NSColor * col; float red, green, blue, alpha; - Lisp_Object rgba[4]; check_ns (); CHECK_STRING (color); @@ -2251,12 +2247,9 @@ [[col colorUsingColorSpaceName: NSCalibratedRGBColorSpace] getRed: &red green: &green blue: &blue alpha: &alpha]; - rgba[0] = make_number (lrint (red*65280)); - rgba[1] = make_number (lrint (green*65280)); - rgba[2] = make_number (lrint (blue*65280)); - rgba[3] = make_number (lrint (alpha*65280)); - - return Flist (4, rgba); + return list3 (make_number (lrint (red*65280)), + make_number (lrint (green*65280)), + make_number (lrint (blue*65280))); }