branch: elpa/buttercup commit 075b318a3aab191e42b976c36aa08a9dfaf9a4d5 Author: Kevin J. Foley <kfole...@gmail.com> Commit: Kevin J. Foley <kfole...@gmail.com>
Add support for :var* Wraps suite in let* form --- buttercup.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/buttercup.el b/buttercup.el index 49f5669..dbeb966 100644 --- a/buttercup.el +++ b/buttercup.el @@ -805,10 +805,15 @@ form.") DESCRIPTION is a string. BODY is a sequence of instructions, mainly calls to `describe', `it' and `before-each'." (declare (indent 1) (debug (&define sexp def-body))) - (let ((new-body (if (eq (elt body 0) :var) - `((let ,(elt body 1) - ,@(cddr body))) - body))) + (let ((new-body + (cond + ((eq (elt body 0) :var) + `((let ,(elt body 1) + ,@(cddr body)))) + ((eq (elt body 0) :var*) + `((let* ,(elt body 1) + ,@(cddr body)))) + (t body)))) `(buttercup-describe ,description (lambda () ,@new-body)))) (defun buttercup-describe (description body-function)