[Top][All Lists]

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

Re: Building Emacs overflowed pure space

From: Stefan Monnier
Subject: Re: Building Emacs overflowed pure space
Date: Thu, 20 Jul 2006 00:05:03 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>> Is it OK to place `(setq ...)' after `,@body' as in the CL-version?
>> The setq can be placed after, but the cdr can't, in case the `body' does
>> a setcdr on it.
> Really?
> I thought the whole point of using make-symbol was to create an
> anonymous loop-var to prevent BODY from accessing/modifying the list.

Indeed.  That's why the setq can be moved.  But the `cdr' is applied to
a cons-cell, not to the anonymous variable, and the cons-cell is
not anonymous.

> Besides, if the CL version is correct, why cannot the subr version of
> dolist do the same?

Then maybe it can.  I was just pointing out that it can change the behavior
in the case where the loop body changes the list destructively as it goes
through it.


reply via email to

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