diff options
| author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2003-12-24 06:39:58 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2003-12-24 06:39:58 +0000 |
| commit | 2d176448abfc1a9142437d05b7a356eaa8fe6670 (patch) | |
| tree | d5b005fd17e9309fca102954bd913692afae62a7 | |
| parent | f74b529c5f57ee01ff437023ada6bd9f5f57c94b (diff) | |
| download | emacs-2d176448abfc1a9142437d05b7a356eaa8fe6670.tar.gz | |
(Fcolor_gray_p): Fix omission bug:
In case `frame' is nil, consult the selected frame.
(Fcolor_supported_p): Likewise.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | 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 <ttn@gnu.org> + + * 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 <teirllm@auburn.edu> * 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; |
