diff src/w32fns.c @ 96084:0623378cdbca

* w32fns.c, xfnc.c (x_default_font_parameter): Only set `font-param' for explicit `font' parameters. * frame.c (x_set_font): Remove unexplained call to fix inf-recursion.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 20 Jun 2008 01:53:32 +0000
parents efbaf6995245
children e7d9b9d2e1ef
line wrap: on
line diff
--- a/src/w32fns.c	Thu Jun 19 10:37:11 2008 +0000
+++ b/src/w32fns.c	Fri Jun 20 01:53:32 2008 +0000
@@ -4274,8 +4274,13 @@
      Lisp_Object parms;
 {
   struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
-  Lisp_Object font = x_get_arg (dpyinfo, parms, Qfont, "font", "Font",
-                                RES_TYPE_STRING);
+  Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
+				RES_TYPE_STRING);
+  Lisp_Object font;
+  if (EQ (font_param, Qunbound))
+    font_param = Qnil;
+  font = !NILP (font_param) ? font_param
+    : x_get_arg (dpyinfo, parms, Qfont, "font", "Font", RES_TYPE_STRING);
 
   if (!STRINGP (font))
     {
@@ -4296,12 +4301,12 @@
       if (NILP (font))
         error ("No suitable font was found");
     }
-  else
+  else if (!NILP (font_param))
     {
       /* Remember the explicit font parameter, so we can re-apply it after
 	 we've applied the `default' face settings.  */
-      x_set_frame_parameters (f, Fcons (Fcons (Qfont_param, font), Qnil));
-  }
+      x_set_frame_parameters (f, Fcons (Fcons (Qfont_param, font_param), Qnil));
+    }
   x_default_parameter (f, parms, Qfont, font, "font", "Font", RES_TYPE_STRING);
 }