diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-10-08 20:08:14 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-10-08 20:08:14 +0200 |
| commit | bbda5bb67eee68cb75495dce1cc3fed28e94e0bc (patch) | |
| tree | 9e6bc8883ad82dc1f647900d7c5e9795c4d3e677 /lisp | |
| parent | 92df5a4f40d08bc61f0d546dd3a693e4ae2c8f92 (diff) | |
transient--parse-suffix: Catch additional mistakes near end of spec
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/transient.el | 8 |
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))) |
