bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11258: 24.1.50; lexical binding inconsistencies


From: Michael Heerdegen
Subject: bug#11258: 24.1.50; lexical binding inconsistencies
Date: Wed, 18 Apr 2012 03:03:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> > ; Test  -*- lexical-binding: t -*-
> > (defun test2 (arg)
> >   (interactive "i")
> >   ((lambda () arg)))

> This is a bug in the handling of ((lambda ...) args) in lexical-binding:
> the compiler treats it as (funcall #'(lambda () ...) args), whereas the
> interpreter treats it as (funcall '(lambda () ...) args), so the
> lambda's body is treated as lexically scoped when compiled but
> dynamically scoped when interpreted.

There is no scoping at all when interpreted.  The dynamical scope is not
established (else, we would get no error), which is right - just the
lexical scope is missing.

> I think the compiler is right, so the interpreter needs fixing.  I'm
> not completely sure it will be harmless, so it won't be fixed in 24.1.

Ok.


Regards,

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]