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

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

[elpa] externals/transient b65491fcb7 173/366: transient--suffix-{comman


From: Jonas Bernoulli
Subject: [elpa] externals/transient b65491fcb7 173/366: transient--suffix-{command, symbol}: Check argument type
Date: Tue, 25 Jan 2022 18:54:38 -0500 (EST)

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

    transient--suffix-{command,symbol}: Check argument type
---
 lisp/transient.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/transient.el b/lisp/transient.el
index 127d29cce1..c76bddc55f 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1209,12 +1209,16 @@ probably use this instead:
 If the value of OBJECT's `command' slot is a command, then return
 that.  Otherwise it is a symbol whose `transient--infix-command'
 property holds an anonymous command, which is returned instead."
+  (cl-check-type object transient-suffix)
   (let ((sym (oref object command)))
     (if (commandp sym)
         sym
       (get sym 'transient--infix-command))))
 
 (defun transient--suffix-symbol (arg)
+  (or (cl-typep arg 'command)
+      (cl-typep arg 'symbol)
+      (signal 'wrong-type-argument `((command symbol) ,arg)))
   (if (symbolp arg)
       arg
     (oref (transient-suffix-object) command)))



reply via email to

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