From: Daniel Colascione <dancol@dancol.org>
To: Levin Du <zslevin@gmail.com>
Cc: Burton Samograd <burton@samograd.ca>, emacs-devel@gnu.org
Subject: Re: RFC: rough draft of Python-style generators for elisp
Date: Thu, 29 Nov 2012 11:49:28 -0700 [thread overview]
Message-ID: <50B7AE38.6040602@dancol.org> (raw)
In-Reply-To: <CAN6cQGPDrc=SfhtjdZ2MFUoZTqFFUhoE=B8V9JygxnbJxaxobA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 585 bytes --]
On 11/29/12 1:41 AM, Levin Du wrote:
> Hi Daniel,
>
> My Emacs version is "GNU Emacs 24.3.50.1".
>
> I tried:
>
> (defgenerator mygen (i)
> (yield 1)
> (yield i)
> (yield 3))
>
> (let ((gen (mygen 100)))
> (list (funcall gen)
> (funcall gen)
> (funcall gen)))
>
> but failed with:
>
> Debugger entered--Lisp error: (void-variable cps-current-state-91642)
lexical-binding needs to be t. Is it okay for defgenerator to let-bind
it at top-level as long as it preserves dynamic binding semantics for
the actual code generated?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 235 bytes --]
next prev parent reply other threads:[~2012-11-29 18:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 3:16 RFC: rough draft of Python-style generators for elisp Daniel Colascione
2012-11-27 15:31 ` Burton Samograd
2012-11-27 21:24 ` Daniel Colascione
2012-11-27 21:26 ` Daniel Colascione
2012-11-29 8:41 ` Levin Du
2012-11-29 18:49 ` Daniel Colascione [this message]
2012-11-29 19:47 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50B7AE38.6040602@dancol.org \
--to=dancol@dancol.org \
--cc=burton@samograd.ca \
--cc=emacs-devel@gnu.org \
--cc=zslevin@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.