aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 4f32e9f9e90..d176edefd1f 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4156,20 +4156,24 @@ FRAME 0 means change the face on all frames, and change the default
4156 struct frame *f; 4156 struct frame *f;
4157 Lisp_Object tmp; 4157 Lisp_Object tmp;
4158 4158
4159 CHECK_STRING (value);
4160 if (EQ (frame, Qt)) 4159 if (EQ (frame, Qt))
4161 f = SELECTED_FRAME (); 4160 f = SELECTED_FRAME ();
4162 else 4161 else
4163 f = check_x_frame (frame); 4162 f = check_x_frame (frame);
4164 4163
4165 /* VALUE may be a fontset name or an alias of fontset. In 4164 if (!UNSPECIFIEDP (value))
4166 such a case, use the base fontset name. */ 4165 {
4167 tmp = Fquery_fontset (value, Qnil); 4166 CHECK_STRING (value);
4168 if (!NILP (tmp))
4169 value = tmp;
4170 4167
4171 if (!set_lface_from_font_name (f, lface, value, 1, 1)) 4168 /* VALUE may be a fontset name or an alias of fontset. In
4172 signal_error ("Invalid font or fontset name", value); 4169 such a case, use the base fontset name. */
4170 tmp = Fquery_fontset (value, Qnil);
4171 if (!NILP (tmp))
4172 value = tmp;
4173
4174 if (!set_lface_from_font_name (f, lface, value, 1, 1))
4175 signal_error ("Invalid font or fontset name", value);
4176 }
4173 4177
4174 font_attr_p = 1; 4178 font_attr_p = 1;
4175 } 4179 }
@@ -6590,11 +6594,7 @@ realize_default_face (f)
6590 /* If the `default' face is not yet known, create it. */ 6594 /* If the `default' face is not yet known, create it. */
6591 lface = lface_from_face_name (f, Qdefault, 0); 6595 lface = lface_from_face_name (f, Qdefault, 0);
6592 if (NILP (lface)) 6596 if (NILP (lface))
6593 { 6597 abort ();
6594 Lisp_Object frame;
6595 XSETFRAME (frame, f);
6596 lface = Finternal_make_lisp_face (Qdefault, frame);
6597 }
6598 6598
6599#ifdef HAVE_WINDOW_SYSTEM 6599#ifdef HAVE_WINDOW_SYSTEM
6600 if (FRAME_WINDOW_P (f)) 6600 if (FRAME_WINDOW_P (f))
@@ -6603,7 +6603,9 @@ realize_default_face (f)
6603 frame_font = Fassq (Qfont, f->param_alist); 6603 frame_font = Fassq (Qfont, f->param_alist);
6604 xassert (CONSP (frame_font) && STRINGP (XCDR (frame_font))); 6604 xassert (CONSP (frame_font) && STRINGP (XCDR (frame_font)));
6605 frame_font = XCDR (frame_font); 6605 frame_font = XCDR (frame_font);
6606 set_lface_from_font_name (f, lface, frame_font, 1, 1); 6606 /* Specify 0 for FORCE_P here, so that we don't override
6607 a :family attribute specified for `default' for new frames. */
6608 set_lface_from_font_name (f, lface, frame_font, 0, 1);
6607 } 6609 }
6608#endif /* HAVE_WINDOW_SYSTEM */ 6610#endif /* HAVE_WINDOW_SYSTEM */
6609 6611