Skip to content

Commit

Permalink
transient-scope: Return nil if all prefixes are nil
Browse files Browse the repository at this point in the history
Return nil if PREFIX is nil, and there is neither a current nor
active prefix.  Previously this would have resulted in a type error.
  • Loading branch information
tarsius committed Nov 25, 2024
1 parent ecdee41 commit d64b73e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d64b73e

Please sign in to comment.