* Editing Changes in Emacs 29.1
+---
+** 'scroll-other-window' and 'scroll-other-window-down' now respects remapping.
+These commands (bound to 'C-M-v' and 'C-M-V') used to scroll the other
+windows without looking a customizations in that other window. These
+functions now check whether they have been rebound in the buffer in
+that other window, and then call the remapped function instead. In
+addition, these commands now also respect the
+'scroll-error-top-bottom' user option.
+
---
** Indentation of 'cl-flet' and 'cl-labels' has changed.
These forms now indent like this:
(put 'scroll-down-command 'scroll-command t)
+(defun scroll-other-window (&optional lines)
+ "Scroll next window upward LINES lines; or near full screen if no ARG.
+See `scroll-up-command' for details."
+ (interactive "P")
+ (with-selected-window (other-window-for-scrolling)
+ (funcall (or (command-remapping #'scroll-up-command)
+ #'scroll-up-command)
+ lines)))
+
+(defun scroll-other-window-down (&optional lines)
+ "Scroll next window downward LINES lines; or near full screen if no ARG.
+See `scroll-down-command' for details."
+ (interactive "P")
+ (with-selected-window (other-window-for-scrolling)
+ (funcall (or (command-remapping #'scroll-down-command)
+ #'scroll-down-command)
+ lines)))
+
;;; Scrolling commands which scroll a line instead of full screen.
(defun scroll-up-line (&optional arg)
return window;
}
-DEFUN ("scroll-other-window", Fscroll_other_window, Sscroll_other_window, 0, 1, "P",
- doc: /* Scroll next window upward ARG lines; or near full screen if no ARG.
-A near full screen is `next-screen-context-lines' less than a full screen.
-Negative ARG means scroll downward. If ARG is the atom `-', scroll
-downward by nearly full screen. When calling from a program, supply
-as argument a number, nil, or `-'.
-
-The next window is usually the one below the current one;
-or the one at the top if the current one is at the bottom.
-It is determined by the function `other-window-for-scrolling',
-which see.
-
-Also see the `other-window-scroll-default' variable. */)
- (Lisp_Object arg)
-{
- specpdl_ref count = SPECPDL_INDEX ();
- scroll_command (Fother_window_for_scrolling (), arg, 1);
- return unbind_to (count, Qnil);
-}
-
-DEFUN ("scroll-other-window-down", Fscroll_other_window_down,
- Sscroll_other_window_down, 0, 1, "P",
- doc: /* Scroll next window downward ARG lines; or near full screen if no ARG.
-For more details, see the documentation for `scroll-other-window'. */)
- (Lisp_Object arg)
-{
- specpdl_ref count = SPECPDL_INDEX ();
- scroll_command (Fother_window_for_scrolling (), arg, -1);
- return unbind_to (count, Qnil);
-}
\f
DEFUN ("scroll-left", Fscroll_left, Sscroll_left, 0, 2, "^P\np",
doc: /* Scroll selected window display ARG columns left.
defsubr (&Sscroll_left);
defsubr (&Sscroll_right);
defsubr (&Sother_window_for_scrolling);
- defsubr (&Sscroll_other_window);
- defsubr (&Sscroll_other_window_down);
defsubr (&Sminibuffer_selected_window);
defsubr (&Srecenter);
defsubr (&Swindow_text_width);