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

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

[elpa] externals/transient bd2a5ea011 3/5: Do not barf on non-symbolic n


From: Jonas Bernoulli
Subject: [elpa] externals/transient bd2a5ea011 3/5: Do not barf on non-symbolic non-suffixes
Date: Thu, 1 Feb 2024 21:49:04 -0500 (EST)

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

    Do not barf on non-symbolic non-suffixes
---
 lisp/transient.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index d11a24b7a2..6c77199d51 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2379,7 +2379,8 @@ value.  Otherwise return CHILDREN as is."
                   (funcall unwind suffix))
                 (advice-remove suffix advice)
                 (oset prefix unwind-suffix nil)))))
-        (advice-add suffix :around advice '((depth . -99)))))
+        (when (symbolp this-command)
+          (advice-add suffix :around advice '((depth . -99))))))
 
   (defun transient--wrap-command ()
     (let* ((prefix transient--prefix)
@@ -2411,7 +2412,8 @@ value.  Otherwise return CHILDREN as is."
       (setq advice `(lambda (fn &rest args)
                       (interactive ,advice-interactive)
                       (apply ',advice-body fn args)))
-      (advice-add suffix :around advice '((depth . -99))))))
+      (when (symbolp this-command)
+        (advice-add suffix :around advice '((depth . -99)))))))
 
 (defun transient--premature-post-command ()
   (and (equal (this-command-keys-vector) [])
@@ -2593,6 +2595,7 @@ exit."
 
 (defun transient--get-pre-command (&optional cmd enforce-type)
   (or (and (not (eq enforce-type 'non-suffix))
+           (symbolp cmd)
            (lookup-key transient--predicate-map (vector cmd)))
       (and (not (eq enforce-type 'suffix))
            (transient--resolve-pre-command



reply via email to

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