From 2d176448abfc1a9142437d05b7a356eaa8fe6670 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Wed, 24 Dec 2003 06:39:58 +0000 Subject: [PATCH] (Fcolor_gray_p): Fix omission bug: In case `frame' is nil, consult the selected frame. (Fcolor_supported_p): Likewise. --- src/ChangeLog | 6 ++++++ src/xfaces.c | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c9cf8c71531..f2277e54dc6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2003-12-24 Thien-Thi Nguyen + + * xfaces.c (Fcolor_gray_p): Fix omission bug: + In case `frame' is nil, consult the selected frame. + (Fcolor_supported_p): Likewise. + 2003-12-23 Luc Teirlinck * fns.c (Frandom, Fstring_make_multibyte, Fset_char_table_range): diff --git a/src/xfaces.c b/src/xfaces.c index 96a1d52b3c2..37a3cc1b0f0 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -1526,8 +1526,11 @@ If FRAME is nil or omitted, use the selected frame. */) { struct frame *f; - CHECK_FRAME (frame); CHECK_STRING (color); + if (NILP (frame)) + frame = selected_frame; + else + CHECK_FRAME (frame); f = XFRAME (frame); return face_color_gray_p (f, SDATA (color)) ? Qt : Qnil; } @@ -1544,8 +1547,11 @@ COLOR must be a valid color name. */) { struct frame *f; - CHECK_FRAME (frame); CHECK_STRING (color); + if (NILP (frame)) + frame = selected_frame; + else + CHECK_FRAME (frame); f = XFRAME (frame); if (face_color_supported_p (f, SDATA (color), !NILP (background_p))) return Qt; @@ -2252,7 +2258,7 @@ static double font_rescale_ratio (name) char *name; { - Lisp_Object tail, elt; + Lisp_Object tail, elt; for (tail = Vface_font_rescale_alist; CONSP (tail); tail = XCDR (tail)) { @@ -2465,7 +2471,7 @@ x_face_list_fonts (f, pattern, pfonts, nfonts, try_alternatives_p) if (nfonts < 0 && CONSP (lfonts)) num_fonts = XFASTINT (Flength (lfonts)); - + /* Make a copy of the font names we got from X, and split them into fields. */ n = nignored = 0; -- 2.39.2