From: Lars Ingebrigtsen Date: Thu, 25 Jul 2019 19:56:17 +0000 (+0200) Subject: Make cl-destructuring-bind errors a bit more understandable X-Git-Tag: emacs-27.0.90~1817^2~122 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7633391ce093b0269e3cc77af8a8f437e5d14042;p=emacs.git Make cl-destructuring-bind errors a bit more understandable * lisp/emacs-lisp/cl-macs.el (cl-destructuring-bind): Make errors when giving the wrong number of arguments to the bindings form more informational (bug#29345). --- diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 4347b4b71bf..8b9224bd1b7 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -695,8 +695,11 @@ its argument list allows full Common Lisp conventions." "Bind the variables in ARGS to the result of EXPR and execute BODY." (declare (indent 2) (debug (&define cl-macro-list1 def-form cl-declarations def-body))) - (let* ((cl--bind-lets nil) (cl--bind-forms nil) - (cl--bind-defs nil) (cl--bind-block 'cl-none) (cl--bind-enquote nil)) + (let* ((cl--bind-lets nil) + (cl--bind-forms nil) + (cl--bind-defs nil) + (cl--bind-block args) + (cl--bind-enquote nil)) (cl--do-arglist (or args '(&aux)) expr) (macroexp-let* (nreverse cl--bind-lets) (macroexp-progn (append (nreverse cl--bind-forms) body)))))