Mercurial > emacs
diff src/xfns.c @ 10717:e0f6b4ab7412
(x_decode_color): Ignore failure from defined_color.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 12 Feb 1995 01:25:14 +0000 |
parents | 92dcc001aa20 |
children | e4d6f6f1fc17 |
line wrap: on
line diff
--- 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'