From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: unused local variables Date: Fri, 30 Nov 2007 12:26:23 +0100 Message-ID: <851wa80yao.fsf@lola.goethe.zz> References: <20071130.182726.126856507.kazu@iij.ad.jp> <20071130.193454.200119602.kazu@iij.ad.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1196421983 9912 80.91.229.12 (30 Nov 2007 11:26:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Nov 2007 11:26:23 +0000 (UTC) Cc: =?utf-8?B?5bGx5pys5ZKM5b2mIEthenUgWWFtYW1vdG8=?= , emacs-devel@gnu.org To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 30 12:26:32 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iy40t-0001fV-6t for ged-emacs-devel@m.gmane.org; Fri, 30 Nov 2007 12:26:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iy40c-0003rt-Nn for ged-emacs-devel@m.gmane.org; Fri, 30 Nov 2007 06:26:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iy40W-0003pY-VW for emacs-devel@gnu.org; Fri, 30 Nov 2007 06:26:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iy40V-0003oV-2E for emacs-devel@gnu.org; Fri, 30 Nov 2007 06:26:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iy40U-0003no-MK for emacs-devel@gnu.org; Fri, 30 Nov 2007 06:26:06 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iy40T-0008N6-FP for emacs-devel@gnu.org; Fri, 30 Nov 2007 06:26:05 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iy40S-0003K3-Jp; Fri, 30 Nov 2007 06:26:04 -0500 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 73EE51C4D3AA; Fri, 30 Nov 2007 12:26:24 +0100 (CET) In-Reply-To: (Juanma Barranquero's message of "Fri, 30 Nov 2007 11:45:06 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:84351 Archived-At: "Juanma Barranquero" writes: > On Nov 30, 2007 11:34 AM, =E5=B1=B1=E6=9C=AC=E5=92=8C=E5=BD=A6 Kazu Yamam= oto wrote: > >> I'm not sure the point of this example. > > The point of the example is (and I'm sure you know it) that dynamic > variables can be used in ways that are not evident to the > byte-compiler just by looking at the lexical scope where the dynamic > variable is used... > >> What I want to say is that case-fold-search in the following example >> is not warned with XEmacs because it is defined with 'defvar'. > > So, yes: what you propose is forcing `defvar' for dynamic variables > used across function boundaries. I am actually surprised that this is supposedly not already the case: the (defvar xxx) construct has the sole purpose of silencing the byte compiler as far as I remember. --=20 David Kastrup, Kriemhildstr. 15, 44793 Bochum