summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2024-11-25 14:02:49 +0100
committerJonas Bernoulli <jonas@bernoul.li>2024-11-25 14:02:49 +0100
commitd64b73efbc0615eaa58f15f8a0438a2c010f5682 (patch)
tree0a67adb0dc7f6612671c8df2bddeb025ef1f6c11 /lisp
parentecdee415fb200937d7bb1eaf26b1bac63d3ce219 (diff)
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/transient.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/transient.el b/lisp/transient.el
index bf178e3..911a34d 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