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

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

[elpa] externals/transient 5a360bb206 090/366: Remove conflicting suffix


From: Jonas Bernoulli
Subject: [elpa] externals/transient 5a360bb206 090/366: Remove conflicting suffix when inserting new suffix
Date: Tue, 25 Jan 2022 18:54:30 -0500 (EST)

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

    Remove conflicting suffix when inserting new suffix
    
    When inserting a suffix and another suffix is bound to same key, then
    remove the other suffix.  I.e. more or less do what `define-key' would
    do.
    
    I believe doing that was already the intention before but instead of
    actually doing that another binding for the suffix that is being was
    removed.  So `transient-insert-suffix' could be used to move where in
    the popup a suffix appeared, which may be useful in some odd cases,
    but isn't what this function is supposed to do.
---
 lisp/transient.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 04d6bcbd7b..6f3e95606f 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -872,7 +872,7 @@ example, sets a variable use `define-infix-command' instead.
          (mem (transient--layout-member loc prefix)))
     (if mem
         (progn
-          (transient-remove-suffix prefix (plist-get (nth 2 suf) :command))
+          (transient-remove-suffix prefix (plist-get (nth 2 suf) :key))
           (cl-ecase action
             (insert  (setcdr mem (cons (car mem) (cdr mem)))
                      (setcar mem suf))



reply via email to

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