unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Harald Hanche-Olsen <hanche@math.ntnu.no>
Cc: emacs-devel@gnu.org
Subject: Re: Why are there two dolist?
Date: Wed, 12 Aug 2009 01:39:57 +0200	[thread overview]
Message-ID: <e01d8a50908111639k5db14c76w53d2122dcdbe3f8f@mail.gmail.com> (raw)
In-Reply-To: <20090811.193025.204578572.hanche@math.ntnu.no>

On Wed, Aug 12, 2009 at 1:30 AM, Harald Hanche-Olsen<hanche@math.ntnu.no> 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
>
>
>




  parent reply	other threads:[~2009-08-11 23:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 22:14 Why are there two dolist? Lennart Borgman
2009-08-11 22:36 ` Lennart Borgman
2009-08-12  8:45   ` David Kastrup
2009-08-12  8:52     ` Lennart Borgman
2009-08-11 22:37 ` Miles Bader
2009-08-11 22:42   ` Lennart Borgman
2009-08-11 22:51     ` Miles Bader
2009-08-11 23:04       ` Lennart Borgman
2009-08-11 23:30         ` Harald Hanche-Olsen
2009-08-11 23:34           ` Miles Bader
2009-08-11 23:41             ` Lennart Borgman
2009-08-11 23:48               ` Miles Bader
2009-08-11 23:39           ` Lennart Borgman [this message]
2009-08-12  0:27             ` Harald Hanche-Olsen
2009-08-12  0:33               ` Lennart Borgman
2009-08-12  0:54                 ` Miles Bader
2009-08-12  0:59                   ` Lennart Borgman
2009-08-12  1:24                 ` Harald Hanche-Olsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e01d8a50908111639k5db14c76w53d2122dcdbe3f8f@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=hanche@math.ntnu.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).