From: Nicolas Petton Date: Fri, 24 Apr 2015 21:12:50 +0000 (+0200) Subject: * lisp/emacs-lisp/seq.el (seq-doseq): Fix the macro. X-Git-Tag: emacs-25.0.90~2309 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ecda8a22194462114f42225e6d64aaae23c5f6d;p=emacs.git * lisp/emacs-lisp/seq.el (seq-doseq): Fix the macro. --- diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index b8647ec93ec..0050ff0a303 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -50,12 +50,12 @@ Evaluate BODY with VAR bound to each element of SEQ, in turn. \(fn (VAR SEQ) BODY...)" (declare (indent 1) (debug ((symbolp form &optional form) body))) - (let ((is-list (make-symbol "is-list")) + (let ((length (make-symbol "length")) (seq (make-symbol "seq")) (index (make-symbol "index"))) `(let* ((,seq ,(cadr spec)) (,length (if (listp ,seq) nil (seq-length ,seq))) - (,index (if ,is-list ,seq 0))) + (,index (if ,length 0 ,seq))) (while (if ,length (< ,index ,length) (consp ,index))