]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fcolor_gray_p): Fix omission bug:
authorThien-Thi Nguyen <ttn@gnuvola.org>
Wed, 24 Dec 2003 06:39:58 +0000 (06:39 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Wed, 24 Dec 2003 06:39:58 +0000 (06:39 +0000)
In case `frame' is nil, consult the selected frame.
(Fcolor_supported_p): Likewise.

src/ChangeLog
src/xfaces.c

index c9cf8c71531b8c825068456b8bee080b8bc28278..f2277e54dc69f71c0b63620070f71ba240ebb1e0 100644 (file)
@@ -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):
index 96a1d52b3c2355af0f366162d6500c1a97626bdc..37a3cc1b0f0f9a1ea25d6d88255316d79f8447c4 100644 (file)
@@ -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;