>From 48c59a8609e325690d9568d991bea7fd199a1acd Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Sat, 10 Jun 2017 12:26:48 -0600 Subject: [PATCH] Fix 'and in cl-loop's for-as-equals-then subclause Update variables in the subclause correctly, and only once (Bug#6583). * lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause): Remove faulty conditional branch. --- lisp/emacs-lisp/cl-macs.el | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index db1518ce61..8222f0dc34 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1273,22 +1273,13 @@ cl--parse-loop-clause (then (if (eq (car cl--loop-args) 'then) (cl--pop2 cl--loop-args) start))) (push (list var nil) loop-for-bindings) - (if (or ands (eq (car cl--loop-args) 'and)) - (progn - (push `(,var - (if ,(or cl--loop-first-flag - (setq cl--loop-first-flag - (make-symbol "--cl-var--"))) - ,start ,var)) - loop-for-sets) - (push (list var then) loop-for-steps)) - (push (list var - (if (eq start then) start - `(if ,(or cl--loop-first-flag - (setq cl--loop-first-flag - (make-symbol "--cl-var--"))) - ,start ,then))) - loop-for-sets)))) + (push (list var + (if (eq start then) start + `(if ,(or cl--loop-first-flag + (setq cl--loop-first-flag + (make-symbol "--cl-var--"))) + ,start ,then))) + loop-for-sets))) ((memq word '(across across-ref)) (let ((temp-vec (make-symbol "--cl-vec--")) -- 2.11.0