summaryrefslogtreecommitdiff
path: root/lisp/pcvs-util.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-04-07 14:25:02 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-04-07 14:25:02 +0000
commit14cfebb986bc40cec3788be7421bb7844c167055 (patch)
tree7761a105a8fcfe9d5fd40404aa38afcb9cd2f650 /lisp/pcvs-util.el
parent59429511341a4d2dbec1f8b890f628ad928bfd5c (diff)
downloademacs-14cfebb986bc40cec3788be7421bb7844c167055.tar.gz
(cvs-map): Avoid recursion :-(
Diffstat (limited to 'lisp/pcvs-util.el')
-rw-r--r--lisp/pcvs-util.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el
index bd4efef8d55..1cbe72796c2 100644
--- a/lisp/pcvs-util.el
+++ b/lisp/pcvs-util.el
@@ -51,9 +51,11 @@
(unless (member x ys) (push x zs)))))
(defun cvs-map (-cvs-map-f &rest -cvs-map-ls)
- (unless (cvs-every 'null -cvs-map-ls)
- (cons (apply -cvs-map-f (mapcar 'car -cvs-map-ls))
- (apply 'cvs-map -cvs-map-f (mapcar 'cdr -cvs-map-ls)))))
+ (let ((accum ()))
+ (while (not (cvs-every 'null -cvs-map-ls))
+ (push (apply -cvs-map-f (mapcar 'car -cvs-map-ls)) accum)
+ (setq -cvs-map-ls (mapcar 'cdr -cvs-map-ls)))
+ (nreverse accum)))
(defun cvs-first (l &optional n)
(if (null n) (car l)