diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-02-12 01:25:14 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-02-12 01:25:14 +0000 |
commit | 898ead4f839f198283e78275dc5abf5c582c5343 (patch) | |
tree | 677c5d872378fcff93ab6f6d36e5fd1ac4fa58a4 /src | |
parent | b7144a095b2740c467cb5083c18b2de3be2e050a (diff) | |
download | emacs-898ead4f839f198283e78275dc5abf5c582c5343.tar.gz |
(x_decode_color): Ignore failure from defined_color.
Diffstat (limited to 'src')
-rw-r--r-- | src/xfns.c | 9 |
1 files changed, 5 insertions, 4 deletions
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' |