aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index acb5820db83..011cd54fd87 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4043,27 +4043,30 @@ FRAME 0 means change the face on all frames, and change the default
4043 else if (EQ (attr, QCfont)) 4043 else if (EQ (attr, QCfont))
4044 { 4044 {
4045#ifdef HAVE_WINDOW_SYSTEM 4045#ifdef HAVE_WINDOW_SYSTEM
4046 /* Set font-related attributes of the Lisp face from an 4046 if (FRAME_WINDOW_P (f))
4047 XLFD font name. */ 4047 {
4048 struct frame *f; 4048 /* Set font-related attributes of the Lisp face from an XLFD
4049 Lisp_Object tmp; 4049 font name. */
4050 struct frame *f;
4051 Lisp_Object tmp;
4050 4052
4051 CHECK_STRING (value, 3); 4053 CHECK_STRING (value, 3);
4052 if (EQ (frame, Qt)) 4054 if (EQ (frame, Qt))
4053 f = SELECTED_FRAME (); 4055 f = SELECTED_FRAME ();
4054 else 4056 else
4055 f = check_x_frame (frame); 4057 f = check_x_frame (frame);
4056 4058
4057 /* VALUE may be a fontset name or an alias of fontset. In such 4059 /* VALUE may be a fontset name or an alias of fontset. In
4058 a case, use the base fontset name. */ 4060 such a case, use the base fontset name. */
4059 tmp = Fquery_fontset (value, Qnil); 4061 tmp = Fquery_fontset (value, Qnil);
4060 if (!NILP (tmp)) 4062 if (!NILP (tmp))
4061 value = tmp; 4063 value = tmp;
4062 4064
4063 if (!set_lface_from_font_name (f, lface, value, 1, 1)) 4065 if (!set_lface_from_font_name (f, lface, value, 1, 1))
4064 signal_error ("Invalid font or fontset name", value); 4066 signal_error ("Invalid font or fontset name", value);
4065 4067
4066 font_attr_p = 1; 4068 font_attr_p = 1;
4069 }
4067#endif /* HAVE_WINDOW_SYSTEM */ 4070#endif /* HAVE_WINDOW_SYSTEM */
4068 } 4071 }
4069 else if (EQ (attr, QCinherit)) 4072 else if (EQ (attr, QCinherit))