[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 413f76a783 16/17: Collect most commands in on
|
From: |
Jonas Bernoulli |
|
Subject: |
[elpa] externals/transient 413f76a783 16/17: Collect most commands in one section |
|
Date: |
Tue, 21 Nov 2023 10:17:51 -0500 (EST) |
branch: externals/transient
commit 413f76a783c3751d14f85afe1add2dc5e9f0c426
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Collect most commands in one section
Now all commands are found in the "Commands" section, with the
exception of `transient--default-infix-command' and boring commands
that wrap around certain built-in commands, found in the "Popup
Navigation" and "Popup Isearch" sections.
Also rearrange the "Commands" section and split it into sub-sections.
---
lisp/transient.el | 87 +++++++++++++++++++++++++++++++------------------------
1 file changed, 49 insertions(+), 38 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 8966b4887e..fc8c0e1d71 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2656,6 +2656,7 @@ prefix argument and pivot to `transient-update'."
(put 'transient--do-minus 'transient-color 'transient-red)
;;; Commands
+;;;; Noop
(defun transient-noop ()
"Do nothing at all."
@@ -2703,11 +2704,7 @@ Please open an issue and post the shown command log."
:error)))
this-original-command
'transient-enable-popup-navigation))
-(defun transient-suspend ()
- "Suspend the current transient.
-It can later be resumed using `transient-resume', while no other
-transient is active."
- (interactive))
+;;;; Core
(defun transient-quit-all ()
"Exit all transients without saving the transient stack."
@@ -2731,7 +2728,41 @@ transient is active."
(interactive)
(setq transient--showp t))
-(defvar transient-resume-mode)
+(defun transient-push-button ()
+ "Invoke the suffix command represented by this button."
+ (interactive))
+
+;;;; Suspend
+
+(defun transient-suspend ()
+ "Suspend the current transient.
+It can later be resumed using `transient-resume', while no other
+transient is active."
+ (interactive))
+
+(define-minor-mode transient-resume-mode
+ "Auxiliary minor-mode used to resume a transient after viewing help.")
+
+(defun transient-resume ()
+ "Resume a previously suspended stack of transients."
+ (interactive)
+ (cond (transient--stack
+ (let ((winconf transient--restore-winconf))
+ (kill-local-variable 'transient--restore-winconf)
+ (when transient-resume-mode
+ (transient-resume-mode -1)
+ (quit-window))
+ (when winconf
+ (set-window-configuration winconf)))
+ (transient--stack-pop))
+ (transient-resume-mode
+ (kill-local-variable 'transient--restore-winconf)
+ (transient-resume-mode -1)
+ (quit-window))
+ (t
+ (message "No suspended transient command"))))
+
+;;;; Help
(defun transient-help (&optional interactive)
"Show help for the active transient or one of its suffixes.\n\n(fn)"
@@ -2755,6 +2786,8 @@ transient is active."
"Type \\`q' to resume transient command."))
t))))
+;;;; Level
+
(defun transient-set-level (&optional command level)
"Set the level of the transient or one of its suffix commands."
(interactive
@@ -2815,6 +2848,8 @@ transient is active."
(setq transient--all-levels-p (not transient--all-levels-p))
(setq transient--refreshp t))
+;;;; Value
+
(defun transient-set ()
"Set active transient's value for this Emacs session."
(interactive)
@@ -2861,34 +2896,20 @@ transient is active."
(oset obj value (nth pos hst))
(mapc #'transient-init-value transient--suffixes))))
-(defun transient-push-button ()
- "Invoke the suffix command represented by this button."
- (interactive))
-
-(defun transient-resume ()
- "Resume a previously suspended stack of transients."
- (interactive)
- (cond (transient--stack
- (let ((winconf transient--restore-winconf))
- (kill-local-variable 'transient--restore-winconf)
- (when transient-resume-mode
- (transient-resume-mode -1)
- (quit-window))
- (when winconf
- (set-window-configuration winconf)))
- (transient--stack-pop))
- (transient-resume-mode
- (kill-local-variable 'transient--restore-winconf)
- (transient-resume-mode -1)
- (quit-window))
- (t
- (message "No suspended transient command"))))
+;;;; Auxiliary
(defun transient-toggle-common ()
"Toggle whether common commands are permanently shown."
(interactive)
(setq transient-show-common-commands (not transient-show-common-commands)))
+(defun transient-toggle-debug ()
+ "Toggle debugging statements for transient commands."
+ (interactive)
+ (setq transient--debug (not transient--debug))
+ (message "Debugging transient %s"
+ (if transient--debug "enabled" "disabled")))
+
(transient-define-suffix transient-echo-arguments (arguments)
"Show the transient's active ARGUMENTS in the echo area.
Intended for use in prefixes used for demonstration purposes,
@@ -4042,16 +4063,6 @@ Suffixes on levels %s and %s are unavailable.\n"
(propertize (format ">=%s" (1+ level))
'face 'transient-disabled-suffix))))))
-(define-minor-mode transient-resume-mode
- "Auxiliary minor-mode used to resume a transient after viewing help.")
-
-(defun transient-toggle-debug ()
- "Toggle debugging statements for transient commands."
- (interactive)
- (setq transient--debug (not transient--debug))
- (message "Debugging transient %s"
- (if transient--debug "enabled" "disabled")))
-
;;; Popup Navigation
(defun transient-scroll-up (&optional arg)
- [elpa] externals/transient updated (3cd1de1695 -> 57bb749f98), Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 43e9c16d0c 05/17: Next release will be 0.5.0, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 609dabfdac 02/17: transient-prefix: Add experimental transient-switch-frame slot, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient c7daf2d34e 03/17: Make shadowed buffer current when calling a group's hide function, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient d39916a43d 08/17: transient-help: Propertize key binding in message, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 7bb6f670fa 09/17: Move definition of transient button-type, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient a53205c51b 10/17: Move definition of transient--restore-winconf, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 7da468ef9d 07/17: transient-format(around:suffix): Absorb around:infix method, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient c885d12b54 15/17: Move definition of transient-resume-mode-map, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 413f76a783 16/17: Collect most commands in one section,
Jonas Bernoulli <=
- [elpa] externals/transient fdd0532575 06/17: transient-format(around:suffix): Cosmetics, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient ee26a40301 14/17: Move definition of transient-toggle-common, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 57bb749f98 17/17: Remove obsolete function alias transient--current-buffer after all, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 38c548e06b 04/17: Keep obsolete transient--current-buffer for one release, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient c55defa145 01/17: Account for shorthands when determining handle-switch-frame predicate, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 45fd93d972 11/17: Move definitions of transient-scroll-{up, down}, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 923246d174 12/17: Move definition of transient-popup-navigation-help, Jonas Bernoulli, 2023/11/21
- [elpa] externals/transient 82bc29d29f 13/17: transient-inhibit-move: Rename and improve strings, Jonas Bernoulli, 2023/11/21