From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#11258: 24.1.50; lexical binding inconsistencies Date: Mon, 16 Apr 2012 22:03:30 +0200 Message-ID: <87vckzsaul.fsf@web.de> Reply-To: michael_heerdegen@web.de NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1334606533 12863 80.91.229.3 (16 Apr 2012 20:02:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2012 20:02:13 +0000 (UTC) To: 11258@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 16 22:02:11 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SJs7h-0005U7-90 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Apr 2012 22:02:05 +0200 Original-Received: from localhost ([::1]:54494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJs7g-00069V-Ld for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Apr 2012 16:02:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJs7d-000695-KL for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 16:02:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJs7b-0001Ge-Hu for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 16:02:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJs7b-0001GG-EL for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 16:01:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SJs7e-0000it-2A for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 16:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Apr 2012 20:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11258 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13346065152761 (code B ref -1); Mon, 16 Apr 2012 20:02:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Apr 2012 20:01:55 +0000 Original-Received: from localhost ([127.0.0.1]:37265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJs7V-0000iS-DQ for submit@debbugs.gnu.org; Mon, 16 Apr 2012 16:01:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57733) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJs7T-0000iG-0K for submit@debbugs.gnu.org; Mon, 16 Apr 2012 16:01:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJs7I-0001Ci-9M for submit@debbugs.gnu.org; Mon, 16 Apr 2012 16:01:42 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:46181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJs7I-0001CT-6A for submit@debbugs.gnu.org; Mon, 16 Apr 2012 16:01:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJs7G-000653-J8 for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 16:01:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJs7E-0001A9-Iq for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 16:01:38 -0400 Original-Received: from fmmailgate05.web.de ([217.72.192.243]:39176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJs7E-000199-Cw for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 16:01:36 -0400 Original-Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate05.web.de (Postfix) with ESMTP id E4D0B6DAD9FE for ; Mon, 16 Apr 2012 22:01:33 +0200 (CEST) Original-Received: from snow.dragon ([89.204.138.158]) by smtp.web.de (mrweb001) with ESMTPA (Nemesis) id 0LtX9Q-1SA0k508iS-010xRu; Mon, 16 Apr 2012 22:01:33 +0200 X-Provags-ID: V02:K0:Xf3H4U9kGb/LQuZCMEbB5LLWHffiQPYooDlXTKzZXUd ICKtzgJ/oMjXDVinXqWFAL9lo738dpc+nQ6qPYNiNo0XhAHU5+ y0OcZEwtcKJSE4YmiQVMzlUTcVsAEIYuS7jqhc6dlxZpsc98w8 AObYyq5WWIaoIa6tcOe3tU09GVQb4VFuTURJbuG6rkMHvBL+5K gz3iISC/b8CQhynaxyEwUT69QyL+m2vRP6zJwBsPQU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59132 Archived-At: Hi, I have an elisp file with this content: ; Test -*- lexical-binding: t -*- (defun test1 (arg) (interactive "i") (funcall (lambda () arg))) (defun test2 (arg) (interactive "i") ((lambda () arg))) ;; (test1 nil) ;; (test2 nil) I visit the file and do M-x eval-buffer. Then I do the following: 1(a) Put point after (test1 nil) and hit C-x C-e: nil 1(b) M-x test1: nil 2(a) Put point after (test2 nil) and hit C-x C-e If I had loaded my .emacs before, I get nil With emacs -Q, I get: Lisp error: (void-variable arg) 2(b) M-x test2: Lisp error: (void-variable arg) Now, byte compile the file, and load the compiled code. Now, repeat the above four tests. You always get nil, and no error. That's strange - shouldn't the result always be nil? If not, this (surprising) behavior should be documented in the manual. I've experimented a lot, and found that the results for 2(a) are not always the same. OTOH, the compiled code always works as expected (result nil). Regards, Michael. In GNU Emacs 24.1.50.1 (i486-pc-linux-gnu, GTK+ Version 3.2.3) of 2012-04-10 on zelenka, modified by Debian (emacs-snapshot package, version 2:20120410-1) Windowing system distributor `The X.Org Foundation', version 11.0.11104000 Configured using: `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/i386-linux-gnu/' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2''