comparison src/window.c @ 1326:709532b86646

* window.c (SAVE_WINDOW_DATA_SIZE): Define this using sizeof, instead of just saying it's 7; that way, we won't get screwed if we add members to struct save_window_data. * window.c (Fset_window_configuration): The pointer to the saved window data is called `data', not just `d'.
author Jim Blandy <jimb@redhat.com>
date Sat, 03 Oct 1992 07:15:35 +0000
parents f03e559aac3e
children 08c2336d83ff
comparison
equal deleted inserted replaced
1325:f03e559aac3e 1326:709532b86646
2303 Lisp_Object root_window; 2303 Lisp_Object root_window;
2304 Lisp_Object focus_frame; 2304 Lisp_Object focus_frame;
2305 /* A vector, interpreted as a struct saved_window */ 2305 /* A vector, interpreted as a struct saved_window */
2306 Lisp_Object saved_windows; 2306 Lisp_Object saved_windows;
2307 }; 2307 };
2308 #define SAVE_WINDOW_DATA_SIZE 7 /* Arg to Fmake_vector */ 2308
2309 /* Arg to Fmake_vector */
2310 #define SAVE_WINDOW_DATA_SIZE \
2311 ((sizeof (struct save_window_data) \
2312 - (sizeof (struct Lisp_Vector) \
2313 /* Don't count the contents member of the struct Lisp_Vector */ \
2314 - sizeof (Lisp_Object))) \
2315 / sizeof (Lisp_Object))
2309 2316
2310 /* This is saved as a Lisp_Vector */ 2317 /* This is saved as a Lisp_Vector */
2311 struct saved_window 2318 struct saved_window
2312 { 2319 {
2313 /* these first two must agree with struct Lisp_Vector in lisp.h */ 2320 /* these first two must agree with struct Lisp_Vector in lisp.h */
2492 /* Fselect_window will have made f the selected frame, so we 2499 /* Fselect_window will have made f the selected frame, so we
2493 reselect the proper frame here. Fselect_frame will change the 2500 reselect the proper frame here. Fselect_frame will change the
2494 selected window too, but that doesn't make the call to 2501 selected window too, but that doesn't make the call to
2495 Fselect_window above totally superfluous; it still sets f's 2502 Fselect_window above totally superfluous; it still sets f's
2496 selected window. */ 2503 selected window. */
2497 Fselect_frame (d->selected_frame); 2504 Fselect_frame (data->selected_frame);
2498 2505
2499 if (!NILP (new_current_buffer)) 2506 if (!NILP (new_current_buffer))
2500 Fset_buffer (new_current_buffer); 2507 Fset_buffer (new_current_buffer);
2501 2508
2502 #ifdef MULTI_FRAME 2509 #ifdef MULTI_FRAME