diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 47 |
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 | ||
| 2345 | DEFUN ("scroll-other-window", Fscroll_other_window, Sscroll_other_window, 0, 1, "P", | 2345 | DEFUN ("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\ |
| 2347 | The next window is the one below the current one; or the one at the top\n\ | ||
| 2348 | if the current one is at the bottom. Negative ARG means scroll downward.\n\ | ||
| 2349 | When calling from a program, supply a number as argument or nil.\n\ | ||
| 2350 | \n\ | ||
| 2351 | If in the minibuffer, `minibuffer-scroll-window' if non-nil\n\ | 2347 | If in the minibuffer, `minibuffer-scroll-window' if non-nil\n\ |
| 2352 | specifies the window to scroll.\n\ | 2348 | specifies the window.\n\ |
| 2353 | If `other-window-scroll-buffer' is non-nil, scroll the window\n\ | 2349 | If `other-window-scroll-buffer' is non-nil, a window\n\ |
| 2354 | showing that buffer, popping the buffer up if necessary.") | 2350 | showing 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 | |||
| 2387 | DEFUN ("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\ | ||
| 2389 | The next window is the one below the current one; or the one at the top\n\ | ||
| 2390 | if the current one is at the bottom. Negative ARG means scroll downward.\n\ | ||
| 2391 | When calling from a program, supply a number as argument or nil.\n\ | ||
| 2392 | \n\ | ||
| 2393 | If in the minibuffer, `minibuffer-scroll-window' if non-nil\n\ | ||
| 2394 | specifies the window to scroll.\n\ | ||
| 2395 | If `other-window-scroll-buffer' is non-nil, scroll the window\n\ | ||
| 2396 | showing 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); |