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

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

[elpa] externals/transient d64b73efbc 17/25: transient-scope: Return nil


From: Jonas Bernoulli
Subject: [elpa] externals/transient d64b73efbc 17/25: transient-scope: Return nil if all prefixes are nil
Date: Tue, 3 Dec 2024 14:35:02 -0500 (EST)

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

    transient-scope: Return nil if all prefixes are nil
    
    Return nil if PREFIX is nil, and there is neither a current nor
    active prefix.  Previously this would have resulted in a type error.
---
 lisp/transient.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index bf178e3fec..911a34d0c7 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3747,7 +3747,8 @@ Return the value of the corresponding object's `scope' 
slot."
         (and (memq (oref obj command)
                    (ensure-list prefix))
              (oref obj scope)))
-    (oref (transient-prefix-object) scope)))
+    (and-let* ((obj (transient-prefix-object)))
+      (oref obj scope))))
 
 ;;; History
 



reply via email to

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