]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_decode_color): Ignore failure from defined_color.
authorRichard M. Stallman <rms@gnu.org>
Sun, 12 Feb 1995 01:25:14 +0000 (01:25 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 12 Feb 1995 01:25:14 +0000 (01:25 +0000)
src/xfns.c

index 37e418ecadde31f93d01314f04597e73833f84b5..993194283f70a4303fbf46985b1c8d1d3c153ae3 100644 (file)
@@ -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;
 }
 \f
 /* Functions called only from `x_set_frame_param'