bin/doom: make invalid command a user-error

It shouldn't invoke error handlers.
This commit is contained in:
Henrik Lissner 2018-09-28 22:29:42 -04:00
parent a91df46aa8
commit f994fb07bf
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -64,7 +64,7 @@ If SHOW-HELP is non-nil, show the documentation for said dispatcher."
(or (assq sym doom--dispatch-command-alist) (or (assq sym doom--dispatch-command-alist)
(assq (cdr (assq sym doom--dispatch-alias-alist)) (assq (cdr (assq sym doom--dispatch-alias-alist))
doom--dispatch-command-alist) doom--dispatch-command-alist)
(error "Invalid command: %s" sym))) (user-error "Invalid command: %s" sym)))
(if show-help (if show-help
(apply #'doom--dispatch-help command desc args) (apply #'doom--dispatch-help command desc args)
(funcall body args)))) (funcall body args))))