emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building Emacs overflowed pure space


From: Kim F. Storm
Subject: Re: Building Emacs overflowed pure space
Date: Thu, 20 Jul 2006 10:14:18 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> So it is safe to take the cdr at the end.
>
> Maybe it is, but it will subtly change the semantics in case the loop body
> modifies the list it's loooping over.

But that subtle difference already exists between the cl and subr versions.
IMO, we better make them consistent.

As you point out, it is not safe to move the `cdr' if BODY modifies
the list.  But we could just document this fact in the docstring, e.g.:

dolist is a Lisp macro in `subr.el'.
(dolist (var list [result]) body...)

Loop over a list.
Evaluate BODY with VAR bound to each car from LIST, in turn.
Then evaluate RESULT to get return value, default nil.
The result is undefined if BODY modifies the list.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]