]> git.eshelyaron.com Git - emacs.git/commitdiff
(Finternal_set_lisp_face_attribute)
authorEli Zaretskii <eliz@gnu.org>
Tue, 23 Oct 2001 17:19:21 +0000 (17:19 +0000)
committerEli Zaretskii <eliz@gnu.org>
Tue, 23 Oct 2001 17:19:21 +0000 (17:19 +0000)
[HAVE_WINDOW_SYSTEM]: Don't do anything for QCfont unless the
frame is on a windowed display.

src/xfaces.c

index acb5820db83d96ae708e2dfdff37afe24c1980a9..011cd54fd879546e74f92c0aae96f7d2fc1ba668 100644 (file)
@@ -4043,27 +4043,30 @@ FRAME 0 means change the face on all frames, and change the default
   else if (EQ (attr, QCfont))
     {
 #ifdef HAVE_WINDOW_SYSTEM
-      /* Set font-related attributes of the Lisp face from an
-        XLFD font name.  */
-      struct frame *f;
-      Lisp_Object tmp;
+      if (FRAME_WINDOW_P (f))
+       {
+         /* Set font-related attributes of the Lisp face from an XLFD
+            font name.  */
+         struct frame *f;
+         Lisp_Object tmp;
 
-      CHECK_STRING (value, 3);
-      if (EQ (frame, Qt))
-       f = SELECTED_FRAME ();
-      else
-       f = check_x_frame (frame);
+         CHECK_STRING (value, 3);
+         if (EQ (frame, Qt))
+           f = SELECTED_FRAME ();
+         else
+           f = check_x_frame (frame);
 
-      /* VALUE may be a fontset name or an alias of fontset.  In such
-         a case, use the base fontset name.  */
-      tmp = Fquery_fontset (value, Qnil);
-      if (!NILP (tmp))
-       value = tmp;
+         /* VALUE may be a fontset name or an alias of fontset.  In
+            such a case, use the base fontset name.  */
+         tmp = Fquery_fontset (value, Qnil);
+         if (!NILP (tmp))
+           value = tmp;
 
-      if (!set_lface_from_font_name (f, lface, value, 1, 1))
-       signal_error ("Invalid font or fontset name", value);
+         if (!set_lface_from_font_name (f, lface, value, 1, 1))
+           signal_error ("Invalid font or fontset name", value);
 
-      font_attr_p = 1;
+         font_attr_p = 1;
+       }
 #endif /* HAVE_WINDOW_SYSTEM */
     }
   else if (EQ (attr, QCinherit))