From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: sending function arguments to recursive function calls Date: Fri, 17 May 2013 16:26:09 +0400 Message-ID: <87mwrt7py6.fsf@yandex.ru> References: <0F54256BD7B94384AC4DDA919D502C20@us.oracle.com> <4D1DF48A7223443FA454C07B20B80E21@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1368793597 17799 80.91.229.3 (17 May 2013 12:26:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 May 2013 12:26:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Stefan Monnier To: Gauthier =?utf-8?Q?=C3=96stervall?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 17 14:26:35 2013 Return-path: Envelope-to: geh-help-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 1UdJk1-0005GS-L8 for geh-help-gnu-emacs@m.gmane.org; Fri, 17 May 2013 14:26:33 +0200 Original-Received: from localhost ([::1]:50347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdJk0-0002A7-U3 for geh-help-gnu-emacs@m.gmane.org; Fri, 17 May 2013 08:26:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdJjn-00028m-6K for help-gnu-emacs@gnu.org; Fri, 17 May 2013 08:26:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UdJji-00015i-8k for help-gnu-emacs@gnu.org; Fri, 17 May 2013 08:26:19 -0400 Original-Received: from mail-lb0-f172.google.com ([209.85.217.172]:36870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdJji-00015T-1b for help-gnu-emacs@gnu.org; Fri, 17 May 2013 08:26:14 -0400 Original-Received: by mail-lb0-f172.google.com with SMTP id y6so4298201lbh.3 for ; Fri, 17 May 2013 05:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding:x-antivirus:x-antivirus-status; bh=VvC6bQrjyihl0L+dq9YWL4ix5vDX4vxJ2VyOVoGervQ=; b=M47ClIJ780xtPMZvRy/tgvsDXsUXfjqu9PZeFmCW60OUxbdZFScRaJf+RCVd2++K1t DZNM25F+reU7ww0x0BdMyJNhBzzaqtqR/G+KnyUbm70HiiYEH/Lv0U1Ef9cXyjagrpZM 2BHpu56lTXFLJeouJFFcBcWHH2mbnPdhDtXAdBxSkH/JHanXWN0anh584lU3lTjsu2r6 8SkjrqMM6I4ul3FnnZWBreD/8XACIWQBtA1ij5pz4zWv+k9tcR8LIdBraCwpct5g9F8k iczvTLvaQvXEt/xQpS6Zx/fTnKS3+c5kplFNAMM2PIkudGZr8GBcWjDR4YS7Odb0XSAg BBBA== X-Received: by 10.112.171.202 with SMTP id aw10mr15484453lbc.32.1368793573025; Fri, 17 May 2013 05:26:13 -0700 (PDT) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPSA id w9sm4809447lbe.6.2013.05.17.05.26.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 May 2013 05:26:12 -0700 (PDT) In-Reply-To: ("Gauthier \=\?utf-8\?Q\?\=C3\=96stervall\=22's\?\= message of "Fri, 17 May 2013 14:20:02 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Antivirus: avast! (VPS 130516-1, 17.05.2013), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.217.172 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90872 Archived-At: Gauthier =C3=96stervall writes: > On Mon, May 13, 2013 at 4:55 PM, Stefan Monnier > wrote: >> That's the question that the byte-compiler can't answer: maybe they >> really weren't used (so you can remove them), or maybe they were used >> elsewhere via dynamic scoping (in which case you need to add a (defvar >> ) to force the use of dynamic scoping for this variable). > > All the variables that the byte-compiler complained about were defined > in the first parameter of a let or a let* expression. > > My understanding of let and let* is that the first parameter defines > local variables to be used in the second parameter (or later in the > first parameter in the case of let*). > > The unused variables I had to remove were not referenced in the last > parameter of the let or let* (nor later in the first parameter of > let*), so I assumed they were not used anywhere. > > Is there a way that such variables may be used elsewhere (via dynamic > scoping)? If yes, how? > Couldn't it be the case only if they were defined with setq (so called > free variables)? This is the ugly side of dynamic scoping. (defun foo () (let ((bar 42)) (baz))) (defun baz () bar) (foo) ; =3D> 42 baz ; =3D> void-variable error