mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(cli): void-variable test error on Emacs 27.x
map.el integration for pcase wasn't introduced until 28.1; it was premature to use it while we support 27.x.
This commit is contained in:
@ -548,14 +548,14 @@ Throws `doom-cli-invalid-option-error' for illegal values."
|
|||||||
errors)
|
errors)
|
||||||
(catch 'done
|
(catch 'done
|
||||||
(dolist (type types)
|
(dolist (type types)
|
||||||
(pcase-let
|
;; REVIEW Use pcase-let + map.el when 27.x support is dropped
|
||||||
(((map :test :read :error)
|
(cl-destructuring-bind (&key test read error &allow-other-keys)
|
||||||
(if (or (symbolp type)
|
(if (or (symbolp type)
|
||||||
(and (stringp type)
|
(and (stringp type)
|
||||||
(string-match-p "^[A-Z0-9-_]+$" type)))
|
(string-match-p "^[A-Z0-9-_]+$" type)))
|
||||||
(cdr (assq (if (symbolp type) type (intern (downcase type)))
|
(cdr (assq (if (symbolp type) type (intern (downcase type)))
|
||||||
doom-cli-option-arg-types))
|
doom-cli-option-arg-types))
|
||||||
(list 'str :test #'stringp))))
|
(list 'str :test #'stringp))
|
||||||
(condition-case-unless-debug e
|
(condition-case-unless-debug e
|
||||||
(or (and (or (null test)
|
(or (and (or (null test)
|
||||||
(if (stringp test)
|
(if (stringp test)
|
||||||
|
Reference in New Issue
Block a user