From a7e147088c222edc57c386f93b4f5624660dd94c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 18 Aug 2022 16:14:06 +0200 Subject: [PATCH] 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. --- lisp/doom-cli-lib.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/doom-cli-lib.el b/lisp/doom-cli-lib.el index 995baa6ed..7b6b1b9dc 100644 --- a/lisp/doom-cli-lib.el +++ b/lisp/doom-cli-lib.el @@ -548,14 +548,14 @@ Throws `doom-cli-invalid-option-error' for illegal values." errors) (catch 'done (dolist (type types) - (pcase-let - (((map :test :read :error) - (if (or (symbolp type) - (and (stringp type) - (string-match-p "^[A-Z0-9-_]+$" type))) - (cdr (assq (if (symbolp type) type (intern (downcase type))) - doom-cli-option-arg-types)) - (list 'str :test #'stringp)))) + ;; REVIEW Use pcase-let + map.el when 27.x support is dropped + (cl-destructuring-bind (&key test read error &allow-other-keys) + (if (or (symbolp type) + (and (stringp type) + (string-match-p "^[A-Z0-9-_]+$" type))) + (cdr (assq (if (symbolp type) type (intern (downcase type))) + doom-cli-option-arg-types)) + (list 'str :test #'stringp)) (condition-case-unless-debug e (or (and (or (null test) (if (stringp test)