# HG changeset patch # User Richard M. Stallman # Date 792552314 0 # Node ID e0f6b4ab74123785be86c684d5c6f7e42825cc17 # Parent 7418dce6e52afd308f01877d1316f3b37969a473 (x_decode_color): Ignore failure from defined_color. diff -r 7418dce6e52a -r e0f6b4ab7412 src/xfns.c --- a/src/xfns.c Sun Feb 12 01:22:28 1995 +0000 +++ b/src/xfns.c Sun Feb 12 01:25:14 1995 +0000 @@ -1016,10 +1016,11 @@ if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1) return def; - if (defined_color (f, XSTRING (arg)->data, &cdef, 1)) - return cdef.pixel; - else - Fsignal (Qundefined_color, Fcons (arg, Qnil)); + /* Ignore the return value of defined_color so that + we use a color close to the one requested + if we can't get the exact request. */ + defined_color (f, XSTRING (arg)->data, &cdef, 1); + return cdef.pixel; } /* Functions called only from `x_set_frame_param'