int minibuffer_only = 0;
long window_prompting = 0;
int width, height;
- ptrdiff_t count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX (), count2;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
Lisp_Object display;
struct x_display_info *dpyinfo = NULL;
end up in init_iterator with a null face cache, which should not
happen. */
init_frame_faces (f);
+
+ /* Temporary disable window-configuration-change-hook to avoid
+ an infloop in next_frame and access to uninitialized frame
+ from Lisp code (Bug#18161). */
+
+ count2 = SPECPDL_INDEX ();
+ record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
+ inhibit_lisp_code = Qt;
/* PXW: This is a duplicate from below. We have to do it here since
otherwise x_set_tool_bar_lines will work with the character sizes
/* Set the menu-bar-lines and tool-bar-lines parameters. We don't
look up the X resources controlling the menu-bar and tool-bar
here; they are processed specially at startup, and reflected in
- the values of the mode variables.
+ the values of the mode variables. */
- Avoid calling window-configuration-change-hook; otherwise we
- could get an infloop in next_frame since the frame is not yet in
- Vframe_list. */
- {
- ptrdiff_t count2 = SPECPDL_INDEX ();
- record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
- inhibit_lisp_code = Qt;
-
- x_default_parameter (f, parms, Qmenu_bar_lines,
- NILP (Vmenu_bar_mode)
- ? make_number (0) : make_number (1),
- NULL, NULL, RES_TYPE_NUMBER);
- x_default_parameter (f, parms, Qtool_bar_lines,
- NILP (Vtool_bar_mode)
- ? make_number (0) : make_number (1),
- NULL, NULL, RES_TYPE_NUMBER);
-
- unbind_to (count2, Qnil);
- }
+ x_default_parameter (f, parms, Qmenu_bar_lines,
+ NILP (Vmenu_bar_mode)
+ ? make_number (0) : make_number (1),
+ NULL, NULL, RES_TYPE_NUMBER);
+ x_default_parameter (f, parms, Qtool_bar_lines,
+ NILP (Vtool_bar_mode)
+ ? make_number (0) : make_number (1),
+ NULL, NULL, RES_TYPE_NUMBER);
+
+ unbind_to (count2, Qnil);
x_default_parameter (f, parms, Qbuffer_predicate, Qnil,
"bufferPredicate", "BufferPredicate",