comparison src/window.c @ 6326:5e662ad3f594

(Fdelete_other_windows): Pass new arg to Fvertical_motion. (window_scroll, Frecenter, Fmove_to_window_line): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Mon, 14 Mar 1994 01:28:49 +0000
parents 8bd31035cf90
children dfc758dd2b08
comparison
equal deleted inserted replaced
6325:d6817c9c0413 6326:5e662ad3f594
1349 1349
1350 Fset_buffer (w->buffer); 1350 Fset_buffer (w->buffer);
1351 opoint = point; 1351 opoint = point;
1352 SET_PT (marker_position (w->start)); 1352 SET_PT (marker_position (w->start));
1353 /* Like Frecenter but avoid setting w->force_start. */ 1353 /* Like Frecenter but avoid setting w->force_start. */
1354 Fvertical_motion (make_number (- (top - FRAME_MENU_BAR_LINES (XFRAME (WINDOW_FRAME (w)))))); 1354 Fvertical_motion (make_number (- (top - FRAME_MENU_BAR_LINES (XFRAME (WINDOW_FRAME (w))))),
1355 window);
1355 Fset_marker (w->start, make_number (PT), w->buffer); 1356 Fset_marker (w->start, make_number (PT), w->buffer);
1356 w->start_at_line_beg = Fbolp (); 1357 w->start_at_line_beg = Fbolp ();
1357 1358
1358 SET_PT (opoint); 1359 SET_PT (opoint);
1359 set_buffer_internal (obuf); 1360 set_buffer_internal (obuf);
2175 XFASTINT (tem) = point; 2176 XFASTINT (tem) = point;
2176 tem = Fpos_visible_in_window_p (tem, window); 2177 tem = Fpos_visible_in_window_p (tem, window);
2177 2178
2178 if (NILP (tem)) 2179 if (NILP (tem))
2179 { 2180 {
2180 Fvertical_motion (make_number (- ht / 2)); 2181 Fvertical_motion (make_number (- ht / 2), window);
2181 XFASTINT (tem) = point; 2182 XFASTINT (tem) = point;
2182 Fset_marker (w->start, tem, w->buffer); 2183 Fset_marker (w->start, tem, w->buffer);
2183 w->force_start = Qt; 2184 w->force_start = Qt;
2184 } 2185 }
2185 2186
2186 SET_PT (marker_position (w->start)); 2187 SET_PT (marker_position (w->start));
2187 lose = n < 0 && point == BEGV; 2188 lose = n < 0 && point == BEGV;
2188 Fvertical_motion (make_number (n)); 2189 Fvertical_motion (make_number (n), window);
2189 pos = point; 2190 pos = point;
2190 bolp = Fbolp (); 2191 bolp = Fbolp ();
2191 SET_PT (opoint); 2192 SET_PT (opoint);
2192 2193
2193 if (lose) 2194 if (lose)
2207 if (pos > opoint) 2208 if (pos > opoint)
2208 SET_PT (pos); 2209 SET_PT (pos);
2209 if (n < 0) 2210 if (n < 0)
2210 { 2211 {
2211 SET_PT (pos); 2212 SET_PT (pos);
2212 tem = Fvertical_motion (make_number (ht)); 2213 tem = Fvertical_motion (make_number (ht), window);
2213 if (point > opoint || XFASTINT (tem) < ht) 2214 if (point > opoint || XFASTINT (tem) < ht)
2214 SET_PT (opoint); 2215 SET_PT (opoint);
2215 else 2216 else
2216 Fvertical_motion (make_number (-1)); 2217 Fvertical_motion (make_number (-1), window);
2217 } 2218 }
2218 } 2219 }
2219 else 2220 else
2220 { 2221 {
2221 if (noerror) 2222 if (noerror)
2402 register Lisp_Object n; 2403 register Lisp_Object n;
2403 { 2404 {
2404 register struct window *w = XWINDOW (selected_window); 2405 register struct window *w = XWINDOW (selected_window);
2405 register int ht = window_internal_height (w); 2406 register int ht = window_internal_height (w);
2406 register int opoint = point; 2407 register int opoint = point;
2408 Lisp_Object window;
2407 2409
2408 if (NILP (n)) 2410 if (NILP (n))
2409 { 2411 {
2410 extern int frame_garbaged; 2412 extern int frame_garbaged;
2411 2413
2425 if (XINT (n) < 0) 2427 if (XINT (n) < 0)
2426 XSETINT (n, XINT (n) + ht); 2428 XSETINT (n, XINT (n) + ht);
2427 2429
2428 XSETINT (n, - XINT (n)); 2430 XSETINT (n, - XINT (n));
2429 2431
2430 Fvertical_motion (n); 2432 XSET (window, Lisp_Window, w);
2433 Fvertical_motion (n, window);
2431 Fset_marker (w->start, make_number (point), w->buffer); 2434 Fset_marker (w->start, make_number (point), w->buffer);
2432 w->start_at_line_beg = Fbolp (); 2435 w->start_at_line_beg = Fbolp ();
2433 2436
2434 SET_PT (opoint); 2437 SET_PT (opoint);
2435 w->force_start = Qt; 2438 w->force_start = Qt;
2447 register Lisp_Object arg; 2450 register Lisp_Object arg;
2448 { 2451 {
2449 register struct window *w = XWINDOW (selected_window); 2452 register struct window *w = XWINDOW (selected_window);
2450 register int height = window_internal_height (w); 2453 register int height = window_internal_height (w);
2451 register int start; 2454 register int start;
2455 Lisp_Object window;
2452 2456
2453 if (NILP (arg)) 2457 if (NILP (arg))
2454 XFASTINT (arg) = height / 2; 2458 XFASTINT (arg) = height / 2;
2455 else 2459 else
2456 { 2460 {
2458 if (XINT (arg) < 0) 2462 if (XINT (arg) < 0)
2459 XSETINT (arg, XINT (arg) + height); 2463 XSETINT (arg, XINT (arg) + height);
2460 } 2464 }
2461 2465
2462 start = marker_position (w->start); 2466 start = marker_position (w->start);
2467 XSET (window, Lisp_Window, w);
2463 if (start < BEGV || start > ZV) 2468 if (start < BEGV || start > ZV)
2464 { 2469 {
2465 Fvertical_motion (make_number (- height / 2)); 2470 Fvertical_motion (make_number (- height / 2), window);
2466 Fset_marker (w->start, make_number (point), w->buffer); 2471 Fset_marker (w->start, make_number (point), w->buffer);
2467 w->start_at_line_beg = Fbolp (); 2472 w->start_at_line_beg = Fbolp ();
2468 w->force_start = Qt; 2473 w->force_start = Qt;
2469 } 2474 }
2470 else 2475 else
2471 SET_PT (start); 2476 SET_PT (start);
2472 2477
2473 return Fvertical_motion (arg); 2478 return Fvertical_motion (arg, window);
2474 } 2479 }
2475 2480
2476 struct save_window_data 2481 struct save_window_data
2477 { 2482 {
2478 int size_from_Lisp_Vector_struct; 2483 int size_from_Lisp_Vector_struct;