aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-25 16:28:53 +0000
committerRichard M. Stallman1994-06-25 16:28:53 +0000
commitccd0664b315dd3c72b0e18a7c162cbcf4f256ecb (patch)
tree3acdf7a8b41b2f42e9800a3422fbd291853d0a00 /src/window.c
parent565101f47302842c104b840f30efbca094875107 (diff)
downloademacs-ccd0664b315dd3c72b0e18a7c162cbcf4f256ecb.tar.gz
emacs-ccd0664b315dd3c72b0e18a7c162cbcf4f256ecb.zip
(Fother_window_for_scrolling): New function.
(Fscroll_other_window): Use that. (syms_of_window): defsubr it.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c47
1 files changed, 31 insertions, 16 deletions
diff --git a/src/window.c b/src/window.c
index 89d9305ca33..347a1f5ec95 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2341,24 +2341,15 @@ When calling from a program, supply a number as argument or nil.")
2341 scroll_command (n, -1); 2341 scroll_command (n, -1);
2342 return Qnil; 2342 return Qnil;
2343} 2343}
2344 2344
2345DEFUN ("scroll-other-window", Fscroll_other_window, Sscroll_other_window, 0, 1, "P", 2345DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0,
2346 "Scroll next window upward ARG lines; or near full screen if no ARG.\n\ 2346 "Return the other window for \"other window scroll\" commands.\n\
2347The next window is the one below the current one; or the one at the top\n\
2348if the current one is at the bottom. Negative ARG means scroll downward.\n\
2349When calling from a program, supply a number as argument or nil.\n\
2350\n\
2351If in the minibuffer, `minibuffer-scroll-window' if non-nil\n\ 2347If in the minibuffer, `minibuffer-scroll-window' if non-nil\n\
2352specifies the window to scroll.\n\ 2348specifies the window.\n\
2353If `other-window-scroll-buffer' is non-nil, scroll the window\n\ 2349If `other-window-scroll-buffer' is non-nil, a window\n\
2354showing that buffer, popping the buffer up if necessary.") 2350showing that buffer is used.")
2355 (n)
2356 register Lisp_Object n;
2357{ 2351{
2358 register Lisp_Object window; 2352 Lisp_Object window;
2359 register int ht;
2360 register struct window *w;
2361 register int count = specpdl_ptr - specpdl;
2362 2353
2363 if (MINI_WINDOW_P (XWINDOW (selected_window)) 2354 if (MINI_WINDOW_P (XWINDOW (selected_window))
2364 && !NILP (Vminibuf_scroll_window)) 2355 && !NILP (Vminibuf_scroll_window))
@@ -2390,6 +2381,29 @@ showing that buffer, popping the buffer up if necessary.")
2390 if (EQ (window, selected_window)) 2381 if (EQ (window, selected_window))
2391 error ("There is no other window"); 2382 error ("There is no other window");
2392 2383
2384 return window;
2385}
2386
2387DEFUN ("scroll-other-window", Fscroll_other_window, Sscroll_other_window, 0, 1, "P",
2388 "Scroll next window upward ARG lines; or near full screen if no ARG.\n\
2389The next window is the one below the current one; or the one at the top\n\
2390if the current one is at the bottom. Negative ARG means scroll downward.\n\
2391When calling from a program, supply a number as argument or nil.\n\
2392\n\
2393If in the minibuffer, `minibuffer-scroll-window' if non-nil\n\
2394specifies the window to scroll.\n\
2395If `other-window-scroll-buffer' is non-nil, scroll the window\n\
2396showing that buffer, popping the buffer up if necessary.")
2397 (n)
2398 register Lisp_Object n;
2399{
2400 register Lisp_Object window;
2401 register int ht;
2402 register struct window *w;
2403 register int count = specpdl_ptr - specpdl;
2404
2405 window = Fother_window_for_scrolling ();
2406
2393 w = XWINDOW (window); 2407 w = XWINDOW (window);
2394 ht = window_internal_height (w); 2408 ht = window_internal_height (w);
2395 2409
@@ -3165,6 +3179,7 @@ If there is only one window, it is split regardless of this value.");
3165 defsubr (&Sscroll_down); 3179 defsubr (&Sscroll_down);
3166 defsubr (&Sscroll_left); 3180 defsubr (&Sscroll_left);
3167 defsubr (&Sscroll_right); 3181 defsubr (&Sscroll_right);
3182 defsubr (&Sother_window_for_scrolling);
3168 defsubr (&Sscroll_other_window); 3183 defsubr (&Sscroll_other_window);
3169 defsubr (&Srecenter); 3184 defsubr (&Srecenter);
3170 defsubr (&Smove_to_window_line); 3185 defsubr (&Smove_to_window_line);