From 29f61c24aeee3489f686f925e9e6a52b54549eff Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 15 Jul 2025 16:23:03 +0300 Subject: [PATCH] Fix shift-translation support of 'scroll-lock-mode' commands * lisp/scroll-lock.el (scroll-lock-next-line-always-scroll) (scroll-lock-next-line, scroll-lock-previous-line) (scroll-lock-forward-paragraph, scroll-lock-backward-paragraph): Make them support shift-translation, like the commands remapped to them do. (Bug#79022) (cherry picked from commit 1ea3d7b1f7d45efa00f4fee5d33556d3c1ff7649) --- lisp/scroll-lock.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el index 6b99e290045..7689ca8bafe 100644 --- a/lisp/scroll-lock.el +++ b/lisp/scroll-lock.el @@ -84,7 +84,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." (defun scroll-lock-next-line-always-scroll (&optional arg) "Scroll up ARG lines keeping point fixed." - (interactive "p") + (interactive "^p") (or arg (setq arg 1)) (scroll-lock-update-goal-column) (condition-case nil @@ -94,7 +94,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." (defun scroll-lock-next-line (&optional arg) "Scroll up ARG lines keeping point fixed." - (interactive "p") + (interactive "^p") (or arg (setq arg 1)) (scroll-lock-update-goal-column) (if (pos-visible-in-window-p (point-max)) @@ -104,7 +104,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." (defun scroll-lock-previous-line (&optional arg) "Scroll up ARG lines keeping point fixed." - (interactive "p") + (interactive "^p") (or arg (setq arg 1)) (scroll-lock-update-goal-column) (condition-case nil @@ -114,7 +114,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." (defun scroll-lock-forward-paragraph (&optional arg) "Scroll down ARG paragraphs keeping point fixed." - (interactive "p") + (interactive "^p") (or arg (setq arg 1)) (scroll-lock-update-goal-column) (scroll-up (count-screen-lines (point) (save-excursion @@ -124,7 +124,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." (defun scroll-lock-backward-paragraph (&optional arg) "Scroll up ARG paragraphs keeping point fixed." - (interactive "p") + (interactive "^p") (or arg (setq arg 1)) (scroll-lock-update-goal-column) (let ((goal (save-excursion (backward-paragraph arg) (point)))) -- 2.39.5