=== modified file 'src/frame.c' --- src/frame.c 2012-06-26 14:41:01 +0000 +++ src/frame.c 2012-06-27 17:55:27 +0000 @@ -465,10 +465,7 @@ Lisp_Object frame; eassert (initial_kboard); - - /* The first call must initialize Vframe_list. */ - if (! (NILP (Vframe_list) || CONSP (Vframe_list))) - Vframe_list = Qnil; + eassert (NILP (Vframe_list)); terminal = init_initial_terminal (); === modified file 'src/window.c' --- src/window.c 2012-06-26 14:41:01 +0000 +++ src/window.c 2012-06-27 17:53:02 +0000 @@ -117,9 +117,6 @@ /* Incremented for each window created. */ static int sequence_number; -/* Nonzero after init_window_once has finished. */ -static int window_initialized; - /* Hook to run when window config changes. */ static Lisp_Object Qwindow_configuration_change_hook; @@ -3019,9 +3016,7 @@ windows_or_buffers_changed++; /* We must select BUFFER for running the window-scroll-functions. */ - /* We can't check ! NILP (Vwindow_scroll_functions) here - because that might itself be a local variable. */ - if (window_initialized) + if (!NILP (Vframe_list)) { record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); Fset_buffer (buffer); @@ -6472,14 +6467,15 @@ void init_window_once (void) { - struct frame *f = make_initial_frame (); + struct frame *f; + + Vframe_list = Qnil; + f = make_initial_frame (); XSETFRAME (selected_frame, f); Vterminal_frame = selected_frame; minibuf_window = f->minibuffer_window; selected_window = f->selected_window; last_nonminibuf_frame = f; - - window_initialized = 1; } void