From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Why are there two dolist? Date: Wed, 12 Aug 2009 01:39:57 +0200 Message-ID: References: <87d472m0b0.fsf@catnip.gol.com> <20090811.193025.204578572.hanche@math.ntnu.no> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250034016 2285 80.91.229.12 (11 Aug 2009 23:40:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2009 23:40:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Harald Hanche-Olsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 12 01:40:09 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mb0wr-000616-D3 for ged-emacs-devel@m.gmane.org; Wed, 12 Aug 2009 01:40:09 +0200 Original-Received: from localhost ([127.0.0.1]:34437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mb0wp-0000cj-MT for ged-emacs-devel@m.gmane.org; Tue, 11 Aug 2009 19:40:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mb0wk-0000b7-L3 for emacs-devel@gnu.org; Tue, 11 Aug 2009 19:40:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mb0wg-0000Vd-23 for emacs-devel@gnu.org; Tue, 11 Aug 2009 19:40:02 -0400 Original-Received: from [199.232.76.173] (port=32884 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mb0wf-0000VS-SB for emacs-devel@gnu.org; Tue, 11 Aug 2009 19:39:57 -0400 Original-Received: from an-out-0708.google.com ([209.85.132.249]:6828) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mb0wf-0003qZ-Gf for emacs-devel@gnu.org; Tue, 11 Aug 2009 19:39:57 -0400 Original-Received: by an-out-0708.google.com with SMTP id b6so1613477ana.21 for ; Tue, 11 Aug 2009 16:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7iW60mh2LoFno0p2RNRbYpD26f8uOw2N2EUbUQToPCc=; b=JoleakkAhDHeizcFHOEUkSA+7d6WC13p1CuW9wkVm337zMG4wulgyanPk3MBs1YB9G IZ46OkK4H0hbMGTJy8ZIFdGy+CtJeylvNeSAwjUk5K3I6mKkFxwniaVEoeOMUHsKgqxZ 2S8Lr8I+sfvSALELf7xwhLsUGkE5h2TkgjS1Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=EP1wYka0iOFDi8zdxpDi/aMTVQg7lNLIhIXtAZKZyMe/RkuNJk2Vu0UW1Yvi4T7BYR XoICQYG7hKgwKnQ05/taADp9jmAgjNGOOZrtbfPK8Suzpt6NAianaKRdYJd11qg372Lg oPK03S0BtMO3Wqi/uDx4MN/9Xf/pDNF9TxENA= Original-Received: by 10.100.12.1 with SMTP id 1mr6191784anl.122.1250033997076; Tue, 11 Aug 2009 16:39:57 -0700 (PDT) In-Reply-To: <20090811.193025.204578572.hanche@math.ntnu.no> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:114109 Archived-At: On Wed, Aug 12, 2009 at 1:30 AM, Harald Hanche-Olsen wrote: >> Maybe the CL version should go away instead? It creates a lexically >> scoped block with a name nil. The explanation in (defmacro block ...) >> does however not say what is lexically scoped so I have no clue. > > AFAICT, the only thing lexically scoped is the name of the block. > In other words, (return-from NAME) will return from the innermost > block named NAME that lexically contains the return-from form. I think > this is pretty well explained in the block docstring? Thanks, but I do not understand all you wrote here. Could (return-from NAME) be inside a function in dolist or does it have to be just inside dolist so to say? >> (And I do not know if return-from mentioned there can work with a >> nil name.) > > (return-from nil) is perfectly good CL, so it ought to work. Thanks. >> However if if means that one dolist version makes VAR lexically scoped >> and the other does not, then the difference is big. > > But it doesn't mean that, as a simple experiment bears out. I think > the only difference between the two is the block, and that will not > affect any elisp code that is unaware of block and return-from. If I understand you correctly the only difference is if (return-from nil) goes to dolist or maybe outside of that? But that is of course a big difference too. > - Harald > > >