Commit 822995f8 authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* frame.c (make_frame): Do not set window's buffer to t.

* window.c (Fsplit_window_internal): Likewise.  Previously it was
used to indicate that the window is being set up.  Now we use
set_window_buffer for all new windows, so the condition in ...
(Fset_window_buffer): ... is always true and can be removed.
parent ed08365b
2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
* frame.c (make_frame): Do not set window's buffer to t.
* window.c (Fsplit_window_internal): Likewise. Previously it was
used to indicate that the window is being set up. Now we use
set_window_buffer for all new windows, so the condition in ...
(Fset_window_buffer): ... is always true and can be removed.
2012-12-07 Dmitry Antipov <dmantipov@yandex.ru> 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
Convenient macro to check whether the buffer is hidden. Convenient macro to check whether the buffer is hidden.
......
...@@ -348,7 +348,6 @@ make_frame (int mini_p) ...@@ -348,7 +348,6 @@ make_frame (int mini_p)
{ {
Lisp_Object buf = Fcurrent_buffer (); Lisp_Object buf = Fcurrent_buffer ();
wset_buffer (XWINDOW (root_window), Qt);
/* If current buffer is hidden, try to find another one. */ /* If current buffer is hidden, try to find another one. */
if (BUFFER_HIDDEN_P (XBUFFER (buf))) if (BUFFER_HIDDEN_P (XBUFFER (buf)))
buf = other_buffer_safely (buf); buf = other_buffer_safely (buf);
...@@ -364,14 +363,11 @@ make_frame (int mini_p) ...@@ -364,14 +363,11 @@ make_frame (int mini_p)
} }
if (mini_p) if (mini_p)
{ set_window_buffer (mini_window,
wset_buffer (XWINDOW (mini_window), Qt); (NILP (Vminibuffer_list)
set_window_buffer (mini_window, ? get_minibuffer (0)
(NILP (Vminibuffer_list) : Fcar (Vminibuffer_list)),
? get_minibuffer (0) 0, 0);
: Fcar (Vminibuffer_list)),
0, 0);
}
fset_root_window (f, root_window); fset_root_window (f, root_window);
fset_selected_window (f, root_window); fset_selected_window (f, root_window);
......
...@@ -3250,8 +3250,7 @@ This function runs `window-scroll-functions' before running ...@@ -3250,8 +3250,7 @@ This function runs `window-scroll-functions' before running
tem = w->buffer; tem = w->buffer;
if (NILP (tem)) if (NILP (tem))
error ("Window is deleted"); error ("Window is deleted");
else if (!EQ (tem, Qt)) else
/* w->buffer is t when the window is first being set up. */
{ {
if (!EQ (tem, buffer)) if (!EQ (tem, buffer))
{ {
...@@ -3914,7 +3913,6 @@ set correctly. See the code of `split-window' for how this is done. */) ...@@ -3914,7 +3913,6 @@ set correctly. See the code of `split-window' for how this is done. */)
wset_next (o, new); wset_next (o, new);
} }
wset_buffer (n, Qt);
wset_window_end_valid (n, Qnil); wset_window_end_valid (n, Qnil);
memset (&n->last_cursor, 0, sizeof n->last_cursor); memset (&n->last_cursor, 0, sizeof n->last_cursor);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment