summaryrefslogtreecommitdiff
path: root/lisp/transient.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/transient.el')
-rw-r--r--lisp/transient.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/transient.el b/lisp/transient.el
index 0f984d1..95c6a94 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1234,8 +1234,8 @@ commands are aliases for."
((setq class 'transient-option)))))
((error "Need command, argument, `:info' or `:info*'; got %s" car)))
(while (keywordp car)
- (let ((key pop)
- (val pop))
+ (let* ((key pop)
+ (val (if spec pop (error "No value for `%s'" key))))
(cond ((eq key :class) (setq class val))
((eq key :level) (setq level val))
((eq key :info)
@@ -1249,7 +1249,9 @@ commands are aliases for."
((or (symbolp val)
(and (listp val) (not (eq (car val) 'lambda))))
(setq args (plist-put args key (macroexp-quote val))))
- ((setq args (plist-put args key val)))))))
+ ((setq args (plist-put args key val))))))
+ (when spec
+ (error "Need keyword, got %S" car)))
(when-let* (((not (plist-get args :key)))
(shortarg (plist-get args :shortarg)))
(setq args (plist-put args :key shortarg)))