mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Fix cl-loop destructuring under `with' clause
This commit is contained in:
parent
e8a77f2423
commit
2fa1b97db0
4 changed files with 13 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2014-04-21 Daniel Colascione <dancol@dancol.org>
|
||||
|
||||
* emacs-lisp/cl-macs.el:
|
||||
(cl--loop-let): Properly destructure `while' clauses.
|
||||
|
||||
2014-04-20 Daniel Colascione <dancol@dancol.org>
|
||||
|
||||
* vc/vc.el (vc-root-dir): New public autoloaded function for
|
||||
|
|
|
|||
|
|
@ -1550,7 +1550,7 @@ If BODY is `setq', then use SPECS for assignments rather than for bindings."
|
|||
(if (and (cl--unused-var-p temp) (null expr))
|
||||
nil ;; Don't bother declaring/setting `temp' since it won't
|
||||
;; be used when `expr' is nil, anyway.
|
||||
(when (and (eq body 'setq) (cl--unused-var-p temp))
|
||||
(when (cl--unused-var-p temp)
|
||||
;; Prefer a fresh uninterned symbol over "_to", to avoid
|
||||
;; warnings that we set an unused variable.
|
||||
(setq temp (make-symbol "--cl-var--"))
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
2014-04-21 Daniel Colascione <dancol@dancol.org>
|
||||
|
||||
* automated/cl-lib.el (cl-loop-destructuring-with): New test.
|
||||
|
||||
2014-04-20 Daniel Colascione <dancol@dancol.org>
|
||||
|
||||
* automated/cl-lib.el (cl-lib-struct-accessors,cl-the): New tests.
|
||||
|
|
|
|||
|
|
@ -220,4 +220,7 @@
|
|||
(should (= (the integer (incf sideffect)) 1))
|
||||
(should (= sideffect 1))))
|
||||
|
||||
(ert-deftest cl-loop-destructuring-with ()
|
||||
(should (equal (cl-loop with (a b c) = '(1 2 3) return (+ a b c)) 6)))
|
||||
|
||||
;;; cl-lib.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue