aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Petton2015-04-24 23:12:50 +0200
committerNicolas Petton2015-04-24 23:12:50 +0200
commit7ecda8a22194462114f42225e6d64aaae23c5f6d (patch)
tree0f8be1bea3d535ace2172c1cefe4a6719f964d34
parentac491b6cf9667e4e68e118eb6db03841599b730f (diff)
downloademacs-7ecda8a22194462114f42225e6d64aaae23c5f6d.tar.gz
emacs-7ecda8a22194462114f42225e6d64aaae23c5f6d.zip
* lisp/emacs-lisp/seq.el (seq-doseq): Fix the macro.
-rw-r--r--lisp/emacs-lisp/seq.el4
1 files changed, 2 insertions, 2 deletions
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.
50 50
51\(fn (VAR SEQ) BODY...)" 51\(fn (VAR SEQ) BODY...)"
52 (declare (indent 1) (debug ((symbolp form &optional form) body))) 52 (declare (indent 1) (debug ((symbolp form &optional form) body)))
53 (let ((is-list (make-symbol "is-list")) 53 (let ((length (make-symbol "length"))
54 (seq (make-symbol "seq")) 54 (seq (make-symbol "seq"))
55 (index (make-symbol "index"))) 55 (index (make-symbol "index")))
56 `(let* ((,seq ,(cadr spec)) 56 `(let* ((,seq ,(cadr spec))
57 (,length (if (listp ,seq) nil (seq-length ,seq))) 57 (,length (if (listp ,seq) nil (seq-length ,seq)))
58 (,index (if ,is-list ,seq 0))) 58 (,index (if ,length 0 ,seq)))
59 (while (if ,length 59 (while (if ,length
60 (< ,index ,length) 60 (< ,index ,length)
61 (consp ,index)) 61 (consp ,index))