From: Richard M. Stallman Date: Sun, 12 Feb 1995 01:25:14 +0000 (+0000) Subject: (x_decode_color): Ignore failure from defined_color. X-Git-Tag: emacs-19.34~5141 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=58387771b5b9124d0ef9e76f7efcb7594e656305;p=emacs.git (x_decode_color): Ignore failure from defined_color. --- diff --git a/src/xfns.c b/src/xfns.c index 37e418ecadd..993194283f7 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1016,10 +1016,11 @@ x_decode_color (f, arg, def) 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'