Skip to content

Commit 21ffc66

Browse files
committed
[maybe]
1 parent 0ef75de commit 21ffc66

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

lisp/transient.el

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,9 +1667,12 @@ See info node `(transient)Modifying Existing Transients'."
16671667
((seq-some #'listp children)
16681668
(when (stringp loc)
16691669
(setq loc (kbd loc)))
1670-
(and-let* ((suffix (seq-find (lambda (s) (transient--loc-match-p s loc))
1671-
children)))
1672-
(list suffix group)))
1670+
(if-let* ((suffix (seq-find (lambda (s) (transient--loc-match-p s loc))
1671+
children)))
1672+
(list suffix group)
1673+
(and (symbolp loc)
1674+
(memq loc children)
1675+
(list loc group))))
16731676
((seq-some (lambda (g) (transient--get-suffix g loc)) children))
16741677
((symbolp loc)
16751678
(and (memq loc children)
@@ -1680,7 +1683,8 @@ See info node `(transient)Modifying Existing Transients'."
16801683
(let* ((props (transient--suffix-props suffix))
16811684
(cmd (plist-get props :command)))
16821685
(if (symbolp loc)
1683-
(eq cmd loc)
1686+
(or (eq cmd loc)
1687+
(eq suffix loc))
16841688
(equal (kbd (or (plist-get props :key)
16851689
(transient--command-key cmd)))
16861690
(kbd loc))))))

0 commit comments

Comments
 (0)