Fix cl-progv binding order
* lisp/emacs-lisp/cl-macs.el (cl-progv): Bind variables in the correct order (bug#47272).
This commit is contained in:
parent
f85b66d9b0
commit
e33c2bfbf3
2 changed files with 7 additions and 1 deletions
|
@ -1976,7 +1976,8 @@ a `let' form, except that the list of symbols can be computed at run-time."
|
|||
(,binds ()))
|
||||
(while ,syms
|
||||
(push (list (pop ,syms) (list 'quote (pop ,vals))) ,binds))
|
||||
(eval (list 'let ,binds (list 'funcall (list 'quote ,bodyfun))))))))
|
||||
(eval (list 'let (nreverse ,binds)
|
||||
(list 'funcall (list 'quote ,bodyfun))))))))
|
||||
|
||||
(defconst cl--labels-magic (make-symbol "cl--labels-magic"))
|
||||
|
||||
|
|
|
@ -648,4 +648,9 @@ collection clause."
|
|||
#'len))
|
||||
(`(function (lambda (,_ ,_) . ,_)) t))))
|
||||
|
||||
(ert-deftest cl-macs--progv ()
|
||||
(should (= (cl-progv '(test test) '(1 2) test) 2))
|
||||
(should (equal (cl-progv '(test1 test2) '(1 2) (list test1 test2))
|
||||
'(1 2))))
|
||||
|
||||
;;; cl-macs-tests.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue