From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Building Emacs overflowed pure space Date: Thu, 20 Jul 2006 10:14:18 +0200 Message-ID: References: <7dbe73ed0607180138x35e9d9bft3e42f20cb369795c@mail.gmail.com> <200607181929.k6IJTZN9028639@jane.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1153383416 24159 80.91.229.2 (20 Jul 2006 08:16:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2006 08:16:56 +0000 (UTC) Cc: teirllm@dms.auburn.edu, rms@gnu.org, ralphm@members.fsf.org, emacs-devel@gnu.org, mituharu@math.s.chiba-u.ac.jp, mathias.dahl@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 20 10:16:53 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G3Ti5-0003Ih-B1 for ged-emacs-devel@m.gmane.org; Thu, 20 Jul 2006 10:16:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3Ti4-0000n4-J7 for ged-emacs-devel@m.gmane.org; Thu, 20 Jul 2006 04:16:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3Thj-0000kq-Ey for emacs-devel@gnu.org; Thu, 20 Jul 2006 04:16:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3Thg-0000j0-Oh for emacs-devel@gnu.org; Thu, 20 Jul 2006 04:16:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3Thg-0000in-DB for emacs-devel@gnu.org; Thu, 20 Jul 2006 04:16:16 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G3Thn-0004uK-78; Thu, 20 Jul 2006 04:16:23 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepc.post.tele.dk (Postfix) with SMTP id A90FC8A003E; Thu, 20 Jul 2006 10:16:00 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Thu, 20 Jul 2006 00:07:42 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57369 Archived-At: Stefan Monnier 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 http://www.cua.dk