diff options
author | John Wiegley <johnw@newartisans.com> | 2017-12-05 11:10:16 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2017-12-05 11:10:16 -0800 |
commit | 0a628a27675491bbf154b4c641876ec1124a59ae (patch) | |
tree | 410c6260d4d0972f5863ef8b7c644f7ccaa4785e /lisp/use-package/use-package-bind-key.el | |
parent | a090961f105595b6c9b56c0e5cda567c76687b06 (diff) | |
download | emacs-0a628a27675491bbf154b4c641876ec1124a59ae.tar.gz emacs-0a628a27675491bbf154b4c641876ec1124a59ae.tar.bz2 emacs-0a628a27675491bbf154b4c641876ec1124a59ae.zip |
Avoid using pcase and many other macros in macro-expanded forms
This is related to https://github.com/jwiegley/use-package/issues/550
Diffstat (limited to 'lisp/use-package/use-package-bind-key.el')
-rw-r--r-- | lisp/use-package/use-package-bind-key.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/use-package/use-package-bind-key.el b/lisp/use-package/use-package-bind-key.el index 54389faf346..09229153f0c 100644 --- a/lisp/use-package/use-package-bind-key.el +++ b/lisp/use-package/use-package-bind-key.el @@ -74,10 +74,8 @@ deferred until the prefix key sequence is pressed." (concat label " a (<string or vector> . <symbol, string or function>)" " or list of these"))) (use-package-normalize-pairs - #'(lambda (k) - (pcase k - ((pred stringp) t) - ((pred vectorp) t))) + #'(lambda (k) (cond ((stringp k) t) + ((vectorp k) t))) #'(lambda (v) (use-package-recognize-function v t #'stringp)) name label arg)))) @@ -91,8 +89,9 @@ deferred until the prefix key sequence is pressed." ;;;###autoload (defun use-package-handler/:bind (name keyword args rest state &optional bind-macro) - (cl-destructuring-bind (nargs . commands) - (use-package-normalize-commands args) + (let* ((result (use-package-normalize-commands args)) + (nargs (car result)) + (commands (cdr result))) (use-package-concat (use-package-process-keywords name (use-package-sort-keywords |