]> git.eshelyaron.com Git - emacs.git/commitdiff
(set_font_frame_param): Don't try to set the font parameter if it is
authorChong Yidong <cyd@stupidchicken.com>
Sun, 6 Jul 2008 03:51:06 +0000 (03:51 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 6 Jul 2008 03:51:06 +0000 (03:51 +0000)
still unspecified in the lface.

src/xfaces.c

index 382e13276791f03b71e7aa19c8a77a5bcf23c81a..ed802b03f7c8382e58cff9de5a7e15e5cfafa10c 100644 (file)
@@ -3501,11 +3501,14 @@ set_font_frame_param (frame, lface)
      Lisp_Object frame, lface;
 {
   struct frame *f = XFRAME (frame);
+  Lisp_Object font;
 
-  if (FRAME_WINDOW_P (f))
+  if (FRAME_WINDOW_P (f)
+      /* Don't do anything if the font is `unspecified'.  This can
+        happen during frame creation.  */
+      && (font = LFACE_FONT (lface),
+         ! UNSPECIFIEDP (font)))
     {
-      Lisp_Object font = LFACE_FONT (lface);
-
       if (FONT_SPEC_P (font))
        {
          font = font_load_for_lface (f, XVECTOR (lface)->contents, font);