From 45fd93d972992c0489a9e8de4170045d4c71d5a1 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Tue, 21 Nov 2023 12:54:14 +0100 Subject: Move definitions of transient-scroll-{up,down} The next few commit collects most commands in one place, but here we do the opposite. Boring commands, such as these, which just wrap some existing command with `with-selected-window', are finally all kept out of sight. --- lisp/transient.el | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lisp/transient.el b/lisp/transient.el index dc9483f..e01fe23 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -2849,22 +2849,6 @@ transient is active." (oset obj value (nth pos hst)) (mapc #'transient-init-value transient--suffixes)))) -(defun transient-scroll-up (&optional arg) - "Scroll text of transient popup window upward ARG lines. -If ARG is nil scroll near full screen. This is a wrapper -around `scroll-up-command' (which see)." - (interactive "^P") - (with-selected-window transient--window - (scroll-up-command arg))) - -(defun transient-scroll-down (&optional arg) - "Scroll text of transient popup window down ARG lines. -If ARG is nil scroll near full screen. This is a wrapper -around `scroll-down-command' (which see)." - (interactive "^P") - (with-selected-window transient--window - (scroll-down-command arg))) - (defun transient-push-button () "Invoke the suffix command represented by this button." (interactive)) @@ -4069,6 +4053,22 @@ resumes the suspended transient." (message "This command is only available if `%s' is non-nil" 'transient-enable-popup-navigation)) +(defun transient-scroll-up (&optional arg) + "Scroll text of transient popup window upward ARG lines. +If ARG is nil scroll near full screen. This is a wrapper +around `scroll-up-command' (which see)." + (interactive "^P") + (with-selected-window transient--window + (scroll-up-command arg))) + +(defun transient-scroll-down (&optional arg) + "Scroll text of transient popup window down ARG lines. +If ARG is nil scroll near full screen. This is a wrapper +around `scroll-down-command' (which see)." + (interactive "^P") + (with-selected-window transient--window + (scroll-down-command arg))) + (defun transient-backward-button (n) "Move to the previous button in the transient popup buffer. See `backward-button' for information about N." -- cgit v1.0