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

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

[elpa] externals/transient 450d0f869f 114/366: transient--insert-suffix:


From: Jonas Bernoulli
Subject: [elpa] externals/transient 450d0f869f 114/366: transient--insert-suffix: Fix use of binding defined in object
Date: Tue, 25 Jan 2022 18:54:32 -0500 (EST)

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

    transient--insert-suffix: Fix use of binding defined in object
    
    The key binding of SUFFIX may be defined in the suffix object or in
    the suffix spec.  Previously we only considered the latter and if that
    binding was nil, then we ended up treating nil as the binding, which
    then resulted in the removal of the suffix specified by LOC from the
    PREFIX.
    
    Fixes #58.
---
 lisp/transient.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 4ef004a4ba..985a5a12d4 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -884,7 +884,8 @@ example, sets a variable use `define-infix-command' instead.
      (t
       (when (and (listp suffix)
                  (listp elt))
-        (let ((key (plist-get (nth 2 suf) :key)))
+        (let ((key (or (plist-get elt :key)
+                       (transient--command-key (plist-get elt :command)))))
           (if (equal (transient--kbd key)
                      (transient--kbd (plist-get (nth 2 elt) :key)))
               (setq action 'replace)



reply via email to

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