aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-12-07 12:13:49 +0400
committerDmitry Antipov2012-12-07 12:13:49 +0400
commit822995f8b9776a3bcd3794eb7c362bed0f21c4a1 (patch)
treec23294c683b04fee27566eeb78537da3ba3b3b52 /src
parented08365b9e2756208b0cd2724715b47df6bf5320 (diff)
downloademacs-822995f8b9776a3bcd3794eb7c362bed0f21c4a1.tar.gz
emacs-822995f8b9776a3bcd3794eb7c362bed0f21c4a1.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/frame.c14
-rw-r--r--src/window.c4
3 files changed, 14 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5c92d94ee64..a8be140ca0e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,13 @@
12012-12-07 Dmitry Antipov <dmantipov@yandex.ru> 12012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 * frame.c (make_frame): Do not set window's buffer to t.
4 * window.c (Fsplit_window_internal): Likewise. Previously it was
5 used to indicate that the window is being set up. Now we use
6 set_window_buffer for all new windows, so the condition in ...
7 (Fset_window_buffer): ... is always true and can be removed.
8
92012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
10
3 Convenient macro to check whether the buffer is hidden. 11 Convenient macro to check whether the buffer is hidden.
4 * buffer.h (BUFFER_HIDDEN_P): New macro. 12 * buffer.h (BUFFER_HIDDEN_P): New macro.
5 * frame.c (make_frame): Use it. Adjust comment. 13 * frame.c (make_frame): Use it. Adjust comment.
diff --git a/src/frame.c b/src/frame.c
index 87b21d0a41c..5cefad6ca46 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -348,7 +348,6 @@ make_frame (int mini_p)
348 { 348 {
349 Lisp_Object buf = Fcurrent_buffer (); 349 Lisp_Object buf = Fcurrent_buffer ();
350 350
351 wset_buffer (XWINDOW (root_window), Qt);
352 /* If current buffer is hidden, try to find another one. */ 351 /* If current buffer is hidden, try to find another one. */
353 if (BUFFER_HIDDEN_P (XBUFFER (buf))) 352 if (BUFFER_HIDDEN_P (XBUFFER (buf)))
354 buf = other_buffer_safely (buf); 353 buf = other_buffer_safely (buf);
@@ -364,14 +363,11 @@ make_frame (int mini_p)
364 } 363 }
365 364
366 if (mini_p) 365 if (mini_p)
367 { 366 set_window_buffer (mini_window,
368 wset_buffer (XWINDOW (mini_window), Qt); 367 (NILP (Vminibuffer_list)
369 set_window_buffer (mini_window, 368 ? get_minibuffer (0)
370 (NILP (Vminibuffer_list) 369 : Fcar (Vminibuffer_list)),
371 ? get_minibuffer (0) 370 0, 0);
372 : Fcar (Vminibuffer_list)),
373 0, 0);
374 }
375 371
376 fset_root_window (f, root_window); 372 fset_root_window (f, root_window);
377 fset_selected_window (f, root_window); 373 fset_selected_window (f, root_window);
diff --git a/src/window.c b/src/window.c
index 9f3474fcd53..d7c2e8b236e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3250,8 +3250,7 @@ This function runs `window-scroll-functions' before running
3250 tem = w->buffer; 3250 tem = w->buffer;
3251 if (NILP (tem)) 3251 if (NILP (tem))
3252 error ("Window is deleted"); 3252 error ("Window is deleted");
3253 else if (!EQ (tem, Qt)) 3253 else
3254 /* w->buffer is t when the window is first being set up. */
3255 { 3254 {
3256 if (!EQ (tem, buffer)) 3255 if (!EQ (tem, buffer))
3257 { 3256 {
@@ -3914,7 +3913,6 @@ set correctly. See the code of `split-window' for how this is done. */)
3914 wset_next (o, new); 3913 wset_next (o, new);
3915 } 3914 }
3916 3915
3917 wset_buffer (n, Qt);
3918 wset_window_end_valid (n, Qnil); 3916 wset_window_end_valid (n, Qnil);
3919 memset (&n->last_cursor, 0, sizeof n->last_cursor); 3917 memset (&n->last_cursor, 0, sizeof n->last_cursor);
3920 3918