summaryrefslogtreecommitdiff
path: root/src/xfaces.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-03-06 04:32:25 +0000
committerRichard M. Stallman <rms@gnu.org>1995-03-06 04:32:25 +0000
commitfb4024c99efa4798ea22796a03cae961f1bda45a (patch)
treead6b950285bd3c0dd7c5ff2676b1afdabd2fd850 /src/xfaces.c
parenta94d9fb4c0877ccd8589c9dc44a3756f520c0416 (diff)
downloademacs-fb4024c99efa4798ea22796a03cae961f1bda45a.tar.gz
(load_color): Call defined_color to allocate the color.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r--src/xfaces.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 2b235e0c0c3..5fe6d2092c5 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -340,26 +340,17 @@ load_color (f, name)
struct frame *f;
Lisp_Object name;
{
- Display *dpy = FRAME_X_DISPLAY (f);
- Colormap cmap;
XColor color;
int result;
if (NILP (name))
return FACE_DEFAULT;
- cmap = DefaultColormapOfScreen (DefaultScreenOfDisplay (dpy));
-
CHECK_STRING (name, 0);
- BLOCK_INPUT;
- result = XParseColor (dpy, cmap, (char *) XSTRING (name)->data, &color);
- UNBLOCK_INPUT;
+ result = defined_color(f, (char *) XSTRING (name)->data, &color, 1);
if (! result)
Fsignal (Qerror, Fcons (build_string ("undefined color"),
Fcons (name, Qnil)));
- BLOCK_INPUT;
- result = XAllocColor (dpy, cmap, &color);
- UNBLOCK_INPUT;
/* Ignore the return value of XallocColor, so that
we use a color close to the one requested
if we can't get the exact request. */