From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: questioning let Date: Wed, 24 Feb 2010 18:29:06 +0100 Message-ID: <4B8561E2.2030809@easy-emacs.de> References: <87vddmx3us.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1267032461 5289 80.91.229.12 (24 Feb 2010 17:27:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 24 Feb 2010 17:27:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 24 18:27:37 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NkL1M-0003U0-GD for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Feb 2010 18:27:36 +0100 Original-Received: from localhost ([127.0.0.1]:56807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkL1L-00059m-NL for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Feb 2010 12:27:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkL0z-00059h-Cs for help-gnu-emacs@gnu.org; Wed, 24 Feb 2010 12:27:13 -0500 Original-Received: from [140.186.70.92] (port=52080 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkL0x-00059L-Kl for help-gnu-emacs@gnu.org; Wed, 24 Feb 2010 12:27:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NkL0w-00080l-SP for help-gnu-emacs@gnu.org; Wed, 24 Feb 2010 12:27:11 -0500 Original-Received: from moutng.kundenserver.de ([212.227.17.10]:50818) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkL0w-00080N-Dr for help-gnu-emacs@gnu.org; Wed, 24 Feb 2010 12:27:10 -0500 Original-Received: from [192.168.178.27] (p54BEB567.dip0.t-ipconnect.de [84.190.181.103]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MDTqb-1NyMAZ3MWz-00H0Zn; Wed, 24 Feb 2010 18:27:07 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: <87vddmx3us.fsf@lola.goethe.zz> X-Provags-ID: V01U2FsdGVkX195E3rKMLnXC1amwPmQoUcc5LxRZCHDgSESWiE j4F9f1WWlg3iEnrTYPiygU1JFX3svs9saK7GXvYtugxEVBFyoh YXu5qbu4l8Q+EgXH/S0Jd7X72rwfnYbtiD8OAG4Rho= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72104 Archived-At: David Kastrup wrote: > Andreas Roehler writes: > >> Hi, >> >> behaviour of the example code below puzzles me. Would >> expect setting of arg by external function, but inside >> `let', recognised. But remains `1'. >> >> (defun arg-setting () >> (interactive) >> (let ((arg 1)) >> (message "%s" arg) >> (arg-extern arg) >> (message "%s" arg))) >> >> (defun arg-extern (arg) >> (setq arg (1- arg))) >> >> Any help? > > The argument binding in arg-extern is the innermost one and consequently > the only affected one. If you make the function argument-less, it will > likely work as expected by you, affecting the binding in arg-setting. > That works, thanks a lot! However, stored in some eil.el, get a compiler warning than: In arg-extern: eil.el:9:9:Warning: reference to free variable `arg' eil.el:9:17:Warning: assignment to free variable `arg' Would think a useless warning, as the compiler should know being inside a let (?) Andreas