diff options
| author | Stefan Monnier | 2008-04-07 14:25:02 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-04-07 14:25:02 +0000 |
| commit | 14cfebb986bc40cec3788be7421bb7844c167055 (patch) | |
| tree | 7761a105a8fcfe9d5fd40404aa38afcb9cd2f650 | |
| parent | 59429511341a4d2dbec1f8b890f628ad928bfd5c (diff) | |
| download | emacs-14cfebb986bc40cec3788be7421bb7844c167055.tar.gz emacs-14cfebb986bc40cec3788be7421bb7844c167055.zip | |
(cvs-map): Avoid recursion :-(
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/pcvs-util.el | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 79a74b68488..9f51e4a0ab8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2008-04-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * pcvs-util.el (cvs-map): Avoid recursion :-( | ||
| 4 | |||
| 1 | 2008-04-07 Glenn Morris <rgm@gnu.org> | 5 | 2008-04-07 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * calendar/calendar.el (calendar-mode-map): Replace use of kbd. | 7 | * calendar/calendar.el (calendar-mode-map): Replace use of kbd. |
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 @@ | |||
| 51 | (unless (member x ys) (push x zs))))) | 51 | (unless (member x ys) (push x zs))))) |
| 52 | 52 | ||
| 53 | (defun cvs-map (-cvs-map-f &rest -cvs-map-ls) | 53 | (defun cvs-map (-cvs-map-f &rest -cvs-map-ls) |
| 54 | (unless (cvs-every 'null -cvs-map-ls) | 54 | (let ((accum ())) |
| 55 | (cons (apply -cvs-map-f (mapcar 'car -cvs-map-ls)) | 55 | (while (not (cvs-every 'null -cvs-map-ls)) |
| 56 | (apply 'cvs-map -cvs-map-f (mapcar 'cdr -cvs-map-ls))))) | 56 | (push (apply -cvs-map-f (mapcar 'car -cvs-map-ls)) accum) |
| 57 | (setq -cvs-map-ls (mapcar 'cdr -cvs-map-ls))) | ||
| 58 | (nreverse accum))) | ||
| 57 | 59 | ||
| 58 | (defun cvs-first (l &optional n) | 60 | (defun cvs-first (l &optional n) |
| 59 | (if (null n) (car l) | 61 | (if (null n) (car l) |