emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/transient d02b4f23e0 18/19: Change key binding for invo


From: Jonas Bernoulli
Subject: [elpa] externals/transient d02b4f23e0 18/19: Change key binding for invoking the current suffix
Date: Mon, 2 May 2022 05:08:26 -0400 (EDT)

branch: externals/transient
commit d02b4f23e0371e4aae0ac4db5905d28878dad9a2
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Change key binding for invoking the current suffix
    
    The binding is in `transient-popup-navigation-map', which means that
    it is always available (provided popup navigation is enabled of).
    
    Some transient prefixes allow arbitrary non-suffix commands to be
    invoked, unless of course a binding of a suffix command conflicts.
    Whatever non-suffix command "RET" would invoked, that's very likely
    one that we should not shadow.  So bind "M-RET", which in most cases
    should be bound to a command that is at least less frequently used
    than whatever "RET" is bound to.
---
 lisp/transient.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 926806eae4..264aaa6be2 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -151,7 +151,12 @@ bindings are available:
  and \\[transient-isearch-forward] starts isearch in the popup buffer.
 
 \\`<mouse-1>' and \\`<mouse-2>' are bound in `transient-push-button'.
-All other bindings are in `transient-popup-navigation-map'."
+All other bindings are in `transient-popup-navigation-map'.
+
+By default \\`M-RET' is bound to `transient-push-button', instead of
+\\`RET', because if a transient allows the invocation of non-suffixes
+then it is likely that you would want \\`RET' to do what it would do
+if no transient were active."
   :package-version '(transient . "0.4.0")
   :group 'transient
   :type 'boolean)
@@ -1588,7 +1593,7 @@ to `transient-predicate-map'.  Also see 
`transient-base-map'.")
     (define-key map (kbd "<down>") #'transient-forward-button)
     (define-key map (kbd "C-r")    #'transient-isearch-backward)
     (define-key map (kbd "C-s")    #'transient-isearch-forward)
-    (define-key map (kbd "RET")    #'transient-push-button)
+    (define-key map (kbd "M-RET")  #'transient-push-button)
     map)
   "One of the keymaps used when popup navigation is enabled.
 See `transient-enable-popup-navigation'.")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]