comparison src/window.c @ 34090:7721faa485ea

(struct saved_window): Add members orig_top and orig_height. (SAVED_WINDOW_VECTOR_SIZE): Increment to 16. (save_window_save, Fset_window_configuration): Save/restore window's orig_top and orig_height.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 01 Dec 2000 19:31:02 +0000
parents 1436ae066de4
children 0225d8e15f2c
comparison
equal deleted inserted replaced
34089:445e01c537a3 34090:7721faa485ea
4486 Lisp_Object buffer, start, pointm, mark; 4486 Lisp_Object buffer, start, pointm, mark;
4487 Lisp_Object left, top, width, height, hscroll; 4487 Lisp_Object left, top, width, height, hscroll;
4488 Lisp_Object parent, prev; 4488 Lisp_Object parent, prev;
4489 Lisp_Object start_at_line_beg; 4489 Lisp_Object start_at_line_beg;
4490 Lisp_Object display_table; 4490 Lisp_Object display_table;
4491 Lisp_Object orig_top, orig_height;
4491 }; 4492 };
4492 #define SAVED_WINDOW_VECTOR_SIZE 14 /* Arg to Fmake_vector */ 4493 #define SAVED_WINDOW_VECTOR_SIZE 16 /* Arg to Fmake_vector */
4493 4494
4494 #define SAVED_WINDOW_N(swv,n) \ 4495 #define SAVED_WINDOW_N(swv,n) \
4495 ((struct saved_window *) (XVECTOR ((swv)->contents[(n)]))) 4496 ((struct saved_window *) (XVECTOR ((swv)->contents[(n)])))
4496 4497
4497 DEFUN ("window-configuration-p", Fwindow_configuration_p, Swindow_configuration_p, 1, 1, 0, 4498 DEFUN ("window-configuration-p", Fwindow_configuration_p, Swindow_configuration_p, 1, 1, 0,
4679 w->top = p->top; 4680 w->top = p->top;
4680 w->width = p->width; 4681 w->width = p->width;
4681 w->height = p->height; 4682 w->height = p->height;
4682 w->hscroll = p->hscroll; 4683 w->hscroll = p->hscroll;
4683 w->display_table = p->display_table; 4684 w->display_table = p->display_table;
4685 w->orig_top = p->orig_top;
4686 w->orig_height = p->orig_height;
4684 XSETFASTINT (w->last_modified, 0); 4687 XSETFASTINT (w->last_modified, 0);
4685 XSETFASTINT (w->last_overlay_modified, 0); 4688 XSETFASTINT (w->last_overlay_modified, 0);
4686 4689
4687 /* Reinstall the saved buffer and pointers into it. */ 4690 /* Reinstall the saved buffer and pointers into it. */
4688 if (NILP (p->buffer)) 4691 if (NILP (p->buffer))
4944 p->top = w->top; 4947 p->top = w->top;
4945 p->width = w->width; 4948 p->width = w->width;
4946 p->height = w->height; 4949 p->height = w->height;
4947 p->hscroll = w->hscroll; 4950 p->hscroll = w->hscroll;
4948 p->display_table = w->display_table; 4951 p->display_table = w->display_table;
4952 p->orig_top = w->orig_top;
4953 p->orig_height = w->orig_height;
4949 if (!NILP (w->buffer)) 4954 if (!NILP (w->buffer))
4950 { 4955 {
4951 /* Save w's value of point in the window configuration. 4956 /* Save w's value of point in the window configuration.
4952 If w is the selected window, then get the value of point 4957 If w is the selected window, then get the value of point
4953 from the buffer; pointm is garbage in the selected window. */ 4958 from the buffer; pointm is garbage in the selected window. */
5041 tem = Fmake_vector (make_number (n_windows), Qnil); 5046 tem = Fmake_vector (make_number (n_windows), Qnil);
5042 data->saved_windows = tem; 5047 data->saved_windows = tem;
5043 for (i = 0; i < n_windows; i++) 5048 for (i = 0; i < n_windows; i++)
5044 XVECTOR (tem)->contents[i] 5049 XVECTOR (tem)->contents[i]
5045 = Fmake_vector (make_number (SAVED_WINDOW_VECTOR_SIZE), Qnil); 5050 = Fmake_vector (make_number (SAVED_WINDOW_VECTOR_SIZE), Qnil);
5046 save_window_save (FRAME_ROOT_WINDOW (f), 5051 save_window_save (FRAME_ROOT_WINDOW (f), XVECTOR (tem), 0);
5047 XVECTOR (tem), 0);
5048 XSETWINDOW_CONFIGURATION (tem, data); 5052 XSETWINDOW_CONFIGURATION (tem, data);
5049 return (tem); 5053 return (tem);
5050 } 5054 }
5051 5055
5052 DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion, 5056 DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion,