all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: 11407@debbugs.gnu.org
Subject: bug#11407: 24.0.96; Doc for lexical binding in Elisp manual
Date: Fri, 4 May 2012 14:08:03 -0700	[thread overview]
Message-ID: <097DFB0C9B894AD3B025768A0B7C0032@us.oracle.com> (raw)
In-Reply-To: <AC92B85C957645C09CC6BFF50177D8F0@us.oracle.com>

> > > (defun foo (arg)
> > >   (lexical-let ((beta  (something)))
> > >     #'(lambda () (alpha arg beta))))
> >  
> > > Does the closure here treat ARG as lexically bound by the 
> > > `defun', or is ARG a dynamically bound free var in the lambda?
> > > I believe the answer is that the value of ARG encapsulated
> > > in the closure is the value that is passed as argument to foo.
> > 
> > The behavior is largely the result of some accidental 
> > design decisions taken years ago in the implementation of
> > lexical-let, and I have no intention to document the result.
> 
> Surely, if `lexical-let' is to be used by users (see above), 
> they deserve a description of its behavior in this regard.
> The behavior is, as I think you're agreeing, not obvious.

Not to mention the additional reason that people converting code that uses
`lexical-let' to use file-wide lexical behavior instead might in some cases need
to be aware of this idiosyncratic behavior, to convert properly.






      reply	other threads:[~2012-05-04 21:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 17:10 bug#11407: 24.0.96; Doc for lexical binding in Elisp manual Drew Adams
2012-05-04 18:05 ` Stefan Monnier
2012-05-04 18:25   ` Drew Adams
2012-05-04 21:08     ` Drew Adams [this message]

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=097DFB0C9B894AD3B025768A0B7C0032@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=11407@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.