# HG changeset patch # User Richard M. Stallman # Date 794464345 0 # Node ID ebae5c9535235d0cb8232870a7f197646cfa1e2e # Parent a78b47b38c4618cc066826d1a3a558638f30b10e (load_color): Call defined_color to allocate the color. diff -r a78b47b38c46 -r ebae5c953523 src/xfaces.c --- a/src/xfaces.c Mon Mar 06 04:25:29 1995 +0000 +++ b/src/xfaces.c Mon Mar 06 04:32:25 1995 +0000 @@ -340,26 +340,17 @@ 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. */