aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/window.c b/src/window.c
index be338c2af61..ef2ed638508 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1796,7 +1796,12 @@ DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0,
1796 doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. 1796 doc: /* Make display in WINDOW start at position POS in WINDOW's buffer.
1797WINDOW must be a live window and defaults to the selected one. Return 1797WINDOW must be a live window and defaults to the selected one. Return
1798POS. Optional third arg NOFORCE non-nil inhibits next redisplay from 1798POS. Optional third arg NOFORCE non-nil inhibits next redisplay from
1799overriding motion of point in order to display at this exact start. */) 1799overriding motion of point in order to display at this exact start.
1800
1801For reliable setting of WINDOW start position, make sure point is
1802at a position that will be visible when that start is in effect,
1803otherwise there's a chance POS will be disregarded, e.g., if point
1804winds up in a partially-visible line. */)
1800 (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce) 1805 (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce)
1801{ 1806{
1802 register struct window *w = decode_live_window (window); 1807 register struct window *w = decode_live_window (window);
@@ -4170,8 +4175,8 @@ temp_output_buffer_show (register Lisp_Object buf)
4170static struct window * 4175static struct window *
4171allocate_window (void) 4176allocate_window (void)
4172{ 4177{
4173 return ALLOCATE_ZEROED_PSEUDOVECTOR 4178 return ALLOCATE_ZEROED_PSEUDOVECTOR (struct window, mode_line_help_echo,
4174 (struct window, current_matrix, PVEC_WINDOW); 4179 PVEC_WINDOW);
4175} 4180}
4176 4181
4177/* Make new window, have it replace WINDOW in window-tree, and make 4182/* Make new window, have it replace WINDOW in window-tree, and make
@@ -6710,7 +6715,8 @@ struct save_window_data
6710 Lisp_Object saved_windows; 6715 Lisp_Object saved_windows;
6711 6716
6712 /* All fields above are traced by the GC. 6717 /* All fields above are traced by the GC.
6713 From `frame-cols' down, the fields are ignored by the GC. */ 6718 After saved_windows, the fields are ignored by the GC. */
6719
6714 /* We should be able to do without the following two. */ 6720 /* We should be able to do without the following two. */
6715 int frame_cols, frame_lines; 6721 int frame_cols, frame_lines;
6716 /* These two should get eventually replaced by their pixel 6722 /* These two should get eventually replaced by their pixel
@@ -7383,15 +7389,11 @@ redirection (see `redirect-frame-focus'). The variable
7383saved by this function. */) 7389saved by this function. */)
7384 (Lisp_Object frame) 7390 (Lisp_Object frame)
7385{ 7391{
7386 Lisp_Object tem;
7387 ptrdiff_t i, n_windows;
7388 struct save_window_data *data;
7389 struct frame *f = decode_live_frame (frame); 7392 struct frame *f = decode_live_frame (frame);
7390 7393 ptrdiff_t n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f)));
7391 n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f))); 7394 struct save_window_data *data
7392 data = ALLOCATE_PSEUDOVECTOR (struct save_window_data, frame_cols, 7395 = ALLOCATE_PSEUDOVECTOR (struct save_window_data, saved_windows,
7393 PVEC_WINDOW_CONFIGURATION); 7396 PVEC_WINDOW_CONFIGURATION);
7394
7395 data->frame_cols = FRAME_COLS (f); 7397 data->frame_cols = FRAME_COLS (f);
7396 data->frame_lines = FRAME_LINES (f); 7398 data->frame_lines = FRAME_LINES (f);
7397 data->frame_menu_bar_lines = FRAME_MENU_BAR_LINES (f); 7399 data->frame_menu_bar_lines = FRAME_MENU_BAR_LINES (f);
@@ -7407,9 +7409,9 @@ saved by this function. */)
7407 data->minibuf_selected_window = minibuf_level > 0 ? minibuf_selected_window : Qnil; 7409 data->minibuf_selected_window = minibuf_level > 0 ? minibuf_selected_window : Qnil;
7408 data->root_window = FRAME_ROOT_WINDOW (f); 7410 data->root_window = FRAME_ROOT_WINDOW (f);
7409 data->focus_frame = FRAME_FOCUS_FRAME (f); 7411 data->focus_frame = FRAME_FOCUS_FRAME (f);
7410 tem = make_uninit_vector (n_windows); 7412 Lisp_Object tem = make_uninit_vector (n_windows);
7411 data->saved_windows = tem; 7413 data->saved_windows = tem;
7412 for (i = 0; i < n_windows; i++) 7414 for (ptrdiff_t i = 0; i < n_windows; i++)
7413 ASET (tem, i, make_nil_vector (VECSIZE (struct saved_window))); 7415 ASET (tem, i, make_nil_vector (VECSIZE (struct saved_window)));
7414 save_window_save (FRAME_ROOT_WINDOW (f), XVECTOR (tem), 0); 7416 save_window_save (FRAME_ROOT_WINDOW (f), XVECTOR (tem), 0);
7415 XSETWINDOW_CONFIGURATION (tem, data); 7417 XSETWINDOW_CONFIGURATION (tem, data);