comparison src/window.c @ 10373:c5c1ffa3755e

(Fscroll_other_window): On small windows, scroll by 1 line.
author Karl Heuer <kwzh@gnu.org>
date Tue, 10 Jan 1995 00:06:50 +0000
parents 34556316a48a
children d3dee0c530d6
comparison
equal deleted inserted replaced
10372:bdf897e70017 10373:c5c1ffa3755e
2578 showing that buffer, popping the buffer up if necessary.") 2578 showing that buffer, popping the buffer up if necessary.")
2579 (n) 2579 (n)
2580 register Lisp_Object n; 2580 register Lisp_Object n;
2581 { 2581 {
2582 register Lisp_Object window; 2582 register Lisp_Object window;
2583 register int ht; 2583 register int defalt;
2584 register struct window *w; 2584 register struct window *w;
2585 register int count = specpdl_ptr - specpdl; 2585 register int count = specpdl_ptr - specpdl;
2586 2586
2587 window = Fother_window_for_scrolling (); 2587 window = Fother_window_for_scrolling ();
2588 2588
2589 w = XWINDOW (window); 2589 w = XWINDOW (window);
2590 ht = window_internal_height (w); 2590 defalt = window_internal_height (w) - next_screen_context_lines;
2591 if (defalt < 1) defalt = 1;
2591 2592
2592 /* Don't screw up if window_scroll gets an error. */ 2593 /* Don't screw up if window_scroll gets an error. */
2593 record_unwind_protect (save_excursion_restore, save_excursion_save ()); 2594 record_unwind_protect (save_excursion_restore, save_excursion_save ());
2594 2595
2595 Fset_buffer (w->buffer); 2596 Fset_buffer (w->buffer);
2596 SET_PT (marker_position (w->pointm)); 2597 SET_PT (marker_position (w->pointm));
2597 2598
2598 if (NILP (n)) 2599 if (NILP (n))
2599 window_scroll (window, ht - next_screen_context_lines, 1); 2600 window_scroll (window, defalt, 1);
2600 else if (EQ (n, Qminus)) 2601 else if (EQ (n, Qminus))
2601 window_scroll (window, next_screen_context_lines - ht, 1); 2602 window_scroll (window, -defalt, 1);
2602 else 2603 else
2603 { 2604 {
2604 if (CONSP (n)) 2605 if (CONSP (n))
2605 n = Fcar (n); 2606 n = Fcar (n);
2606 CHECK_NUMBER (n, 0); 2607 CHECK_NUMBER (n, 0);