diff options
| author | Eli Zaretskii | 2025-07-15 16:23:03 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-07-15 16:23:03 +0300 |
| commit | 1ea3d7b1f7d45efa00f4fee5d33556d3c1ff7649 (patch) | |
| tree | 2496767253713ff1eb4197a894db23b95f477727 | |
| parent | c82a62fa36237b354c47c1c4d2cb4db0e9100bf3 (diff) | |
| download | emacs-1ea3d7b1f7d45efa00f4fee5d33556d3c1ff7649.tar.gz emacs-1ea3d7b1f7d45efa00f4fee5d33556d3c1ff7649.zip | |
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)
| -rw-r--r-- | lisp/scroll-lock.el | 10 |
1 files 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." | |||
| 84 | 84 | ||
| 85 | (defun scroll-lock-next-line-always-scroll (&optional arg) | 85 | (defun scroll-lock-next-line-always-scroll (&optional arg) |
| 86 | "Scroll up ARG lines keeping point fixed." | 86 | "Scroll up ARG lines keeping point fixed." |
| 87 | (interactive "p") | 87 | (interactive "^p") |
| 88 | (or arg (setq arg 1)) | 88 | (or arg (setq arg 1)) |
| 89 | (scroll-lock-update-goal-column) | 89 | (scroll-lock-update-goal-column) |
| 90 | (condition-case nil | 90 | (condition-case nil |
| @@ -94,7 +94,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." | |||
| 94 | 94 | ||
| 95 | (defun scroll-lock-next-line (&optional arg) | 95 | (defun scroll-lock-next-line (&optional arg) |
| 96 | "Scroll up ARG lines keeping point fixed." | 96 | "Scroll up ARG lines keeping point fixed." |
| 97 | (interactive "p") | 97 | (interactive "^p") |
| 98 | (or arg (setq arg 1)) | 98 | (or arg (setq arg 1)) |
| 99 | (scroll-lock-update-goal-column) | 99 | (scroll-lock-update-goal-column) |
| 100 | (if (pos-visible-in-window-p (point-max)) | 100 | (if (pos-visible-in-window-p (point-max)) |
| @@ -104,7 +104,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." | |||
| 104 | 104 | ||
| 105 | (defun scroll-lock-previous-line (&optional arg) | 105 | (defun scroll-lock-previous-line (&optional arg) |
| 106 | "Scroll up ARG lines keeping point fixed." | 106 | "Scroll up ARG lines keeping point fixed." |
| 107 | (interactive "p") | 107 | (interactive "^p") |
| 108 | (or arg (setq arg 1)) | 108 | (or arg (setq arg 1)) |
| 109 | (scroll-lock-update-goal-column) | 109 | (scroll-lock-update-goal-column) |
| 110 | (condition-case nil | 110 | (condition-case nil |
| @@ -114,7 +114,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." | |||
| 114 | 114 | ||
| 115 | (defun scroll-lock-forward-paragraph (&optional arg) | 115 | (defun scroll-lock-forward-paragraph (&optional arg) |
| 116 | "Scroll down ARG paragraphs keeping point fixed." | 116 | "Scroll down ARG paragraphs keeping point fixed." |
| 117 | (interactive "p") | 117 | (interactive "^p") |
| 118 | (or arg (setq arg 1)) | 118 | (or arg (setq arg 1)) |
| 119 | (scroll-lock-update-goal-column) | 119 | (scroll-lock-update-goal-column) |
| 120 | (scroll-up (count-screen-lines (point) (save-excursion | 120 | (scroll-up (count-screen-lines (point) (save-excursion |
| @@ -124,7 +124,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." | |||
| 124 | 124 | ||
| 125 | (defun scroll-lock-backward-paragraph (&optional arg) | 125 | (defun scroll-lock-backward-paragraph (&optional arg) |
| 126 | "Scroll up ARG paragraphs keeping point fixed." | 126 | "Scroll up ARG paragraphs keeping point fixed." |
| 127 | (interactive "p") | 127 | (interactive "^p") |
| 128 | (or arg (setq arg 1)) | 128 | (or arg (setq arg 1)) |
| 129 | (scroll-lock-update-goal-column) | 129 | (scroll-lock-update-goal-column) |
| 130 | (let ((goal (save-excursion (backward-paragraph arg) (point)))) | 130 | (let ((goal (save-excursion (backward-paragraph arg) (point)))) |