[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 4a36b1d922 17/38: Interpret t and nil for sub
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 4a36b1d922 17/38: Interpret t and nil for sub-prefixes in define-transient-prefix |
Date: |
Tue, 11 Jan 2022 05:37:45 -0500 (EST) |
branch: externals/transient
commit 4a36b1d92298ae9ee68a81375af2b445cb2917ba
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Interpret t and nil for sub-prefixes in define-transient-prefix
If a sub-prefix has :transient t, it should recurse (and its suffixes
return). Correspondingly, explicit :transient nil should replace.
---
lisp/transient.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 1b1e53400a..22838d1f61 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1658,11 +1658,12 @@ of the corresponding object.")
(define-key map (vector sym)
(let ((do (oref obj transient)))
(pcase (list do sub-prefix)
- (`(t t) #'transient--do-replace)
+ (`(t t) #'transient--do-recurse)
(`(t nil) (if (cl-typep obj 'transient-infix)
#'transient--do-stay
#'transient--do-call))
- (`(nil ,_) #'transient--do-exit)
+ (`(nil t) #'transient--do-replace)
+ (`(nil nil) #'transient--do-exit)
(_ do)))))
((not (lookup-key transient-predicate-map (vector sym)))
(define-key map (vector sym)
@@ -2269,8 +2270,8 @@ If there is no parent prefix, then just call the command."
(let ((command (oref prefix-obj command)))
(when-let ((suffix-obj (transient-suffix-object command)))
(when (and (slot-boundp suffix-obj 'transient)
- (eq (oref suffix-obj transient)
- 'transient--do-recurse))
+ (memq (oref suffix-obj transient)
+ (list t #'transient--do-recurse)))
(oset prefix-obj transient-suffix 'transient--do-return))))))
(defun transient--do-replace ()
- [elpa] externals/transient 6103f168aa 28/38: transient--describe-function: Deal with anonymous infix arguments, (continued)
- [elpa] externals/transient 6103f168aa 28/38: transient--describe-function: Deal with anonymous infix arguments, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 2c9cef1f5a 33/38: Bump copyright years, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient e77d16dd02 03/38: transient--post-command: Avoid needlessly recreating redisplay map, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 79c999d263 06/38: transient--post-exit: New function, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 2e33f96cf0 07/38: transient--post-command: Cosmetics, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 76b77e01ac 09/38: magit--{pre, post}-command: Add emergency exits, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 7b8a7d718a 08/38: Use a more targeted approach to suspending transient override, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 09b436fad0 10/38: transient--debug: Ignore error in transient--suffix-symbol, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient f2e0dfcc4b 11/38: transient--get-predicate-for: Ignore error in transient--suffix-symbol, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 3c78b10f52 14/38: transient--redisplay: Don't redisplay during mouse-drag-region, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 4a36b1d922 17/38: Interpret t and nil for sub-prefixes in define-transient-prefix,
Jonas Bernoulli <=
- [elpa] externals/transient 1cdadfddf8 21/38: manual: Use source block, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 777a84d26b 20/38: manual: Document all options, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 51585b8dd7 25/38: transient-reset: New command, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 6c9ae1f46a 27/38: manual: Replace some inaccurate information, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient de5a325616 30/38: Re-align debug declarations, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 12097b72d7 32/38: manual: Regenerate, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 45241225cf 36/38: transient-common-commands: Evaluate lambdas, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient cda6a12042 23/38: transient-align-variable-pitch: New option, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 4c31a10113 31/38: Remove unnecessary with-eval-after-load, Jonas Bernoulli, 2022/01/11
- [elpa] externals/transient 8b1f8dcc51 35/38: transient--minibuffer-depth: Must always be a number, Jonas Bernoulli, 2022/01/11