+2006-10-05 Chong Yidong <cyd@stupidchicken.com>
+
+ * frame.c (Qinhibit_face_set_after_frame_default): New var.
+ (syms_of_frame): Initialize it.
+ (x_set_frame_parameters): Avoid resetting :font attributes to the
+ new-frame defaults.
+
2006-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
* lisp.h (clear_regexp_cache): Declare.
Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth;
+Lisp_Object Qinhibit_face_set_after_frame_default;
Lisp_Object Qface_set_after_frame_default;
|| EQ (prop, Qfullscreen))
{
register Lisp_Object param_index, old_value;
+ int count = SPECPDL_INDEX ();
old_value = get_frame_param (f, prop);
fullscreen_is_being_set |= EQ (prop, Qfullscreen);
if (NILP (Fequal (val, old_value)))
{
+ /* For :font attributes, the frame_parm_handler
+ x_set_font calls `face-set-after-frame-default'.
+ Unless we bind inhibit-face-set-after-frame-default
+ here, this would reset the :font attribute that we
+ just applied to the default value for new faces. */
+ specbind (Qinhibit_face_set_after_frame_default, Qt);
+
store_frame_param (f, prop, val);
param_index = Fget (prop, Qx_frame_parameter);
< sizeof (frame_parms)/sizeof (frame_parms[0]))
&& rif->frame_parm_handlers[XINT (param_index)])
(*(rif->frame_parm_handlers[XINT (param_index)])) (f, val, old_value);
+
+ unbind_to (count, Qnil);
}
}
}
Qface_set_after_frame_default = intern ("face-set-after-frame-default");
staticpro (&Qface_set_after_frame_default);
+ Qinhibit_face_set_after_frame_default
+ = intern ("inhibit-face-set-after-frame-default");
+ staticpro (&Qinhibit_face_set_after_frame_default);
+
Qfullwidth = intern ("fullwidth");
staticpro (&Qfullwidth);
Qfullheight = intern ("fullheight");