From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Adrian Aichner Newsgroups: gmane.emacs.devel Subject: Re: void variable Date: Sun, 25 Jul 2004 09:56:21 +0200 Organization: The XEmacs Project Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <410353ED.1090107@math.ku.dk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1090742157 31991 80.91.224.253 (25 Jul 2004 07:55:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Jul 2004 07:55:57 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 25 09:55:48 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BodrI-0000fJ-00 for ; Sun, 25 Jul 2004 09:55:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BoduF-0007KR-SK for ged-emacs-devel@m.gmane.org; Sun, 25 Jul 2004 03:58:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bodu2-0007Jh-TE for emacs-devel@gnu.org; Sun, 25 Jul 2004 03:58:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bodtz-0007IF-QO for emacs-devel@gnu.org; Sun, 25 Jul 2004 03:58:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bodtz-0007I9-LB for emacs-devel@gnu.org; Sun, 25 Jul 2004 03:58:35 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bodqc-0002LO-Hg for emacs-devel@gnu.org; Sun, 25 Jul 2004 03:55:06 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1Bodqb-0001sX-00 for ; Sun, 25 Jul 2004 09:55:05 +0200 Original-Received: from pd9590f68.dip.t-dialin.net ([217.89.15.104]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Jul 2004 09:55:05 +0200 Original-Received: from adrian by pd9590f68.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Jul 2004 09:55:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 42 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pd9590f68.dip.t-dialin.net X-Attribution: APA X-Face: 4[iHdXiTu\V3u[~\I)*}#kYF[-tYl3VZga/HSOP|K,{L Rtu@f0y/=O&Cu}\:~d|P$JON?pn?j,&CnPb1z#/TL9bkAJwyol&a:SvYj-VYbM=Dtxhk9 =w|R6U3_;SH&B List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25939 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25939 Lars Hansen writes: > Assume that you on the load path have a file foo.el containing the line > > (defvar foo 'x) > > If you evaluate > > (let ((foo 'y)) (load "foo.el")) > foo > > you get > > Symbol's value as variable is void: foo > > Observe that the loading may very well be implicit like in > > (let ((foo 'y)) (bar)) > > where bar could be an autoloaded function in foo.el or even in another > module requiring foo.el. > This behavior is not new. It works like that in Emacs 21.2 and Emacs 20.7. > > Is the behavior a bug that should be fixed, or is it OK but should be > documented? Or is it documented already? Hi Lars, the local binding of foo established by the let form is causing this behavior. This is pretty well documented in (info "(lispref)Local Variables") and (info "(lispref)Variable Scoping") Hope this helps, Adrian -- Adrian Aichner mailto:adrian@xemacs.org http://www.xemacs.org/