From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22387 invoked from network); 8 Aug 2005 17:13:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Aug 2005 17:13:19 -0000 Received: (qmail 68158 invoked from network); 8 Aug 2005 17:13:13 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Aug 2005 17:13:13 -0000 Received: (qmail 24311 invoked by alias); 8 Aug 2005 17:13:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21576 Received: (qmail 24302 invoked from network); 8 Aug 2005 17:13:11 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Aug 2005 17:13:11 -0000 Received: (qmail 67872 invoked from network); 8 Aug 2005 17:13:11 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 8 Aug 2005 17:13:06 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Mon, 8 Aug 2005 18:10:57 +0100 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 8 Aug 2005 18:12:48 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.1/8.12.11) with ESMTP id j78HD4hp006541 for ; Mon, 8 Aug 2005 18:13:04 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j78HD3BZ006538 for ; Mon, 8 Aug 2005 18:13:04 +0100 Message-Id: <200508081713.j78HD3BZ006538@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: WARN_CREATE_GLOBAL option In-reply-to: <200508081356.j78DuEkJ025647@news01.csr.com> References: <200508081356.j78DuEkJ025647@news01.csr.com> Date: Mon, 08 Aug 2005 18:13:03 +0100 From: Peter Stephenson X-OriginalArrivalTime: 08 Aug 2005 17:12:48.0147 (UTC) FILETIME=[667E9630:01C59C3C] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Here's a test. Index: Test/E01options.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/E01options.ztst,v retrieving revision 1.13 diff -u -r1.13 E01options.ztst --- Test/E01options.ztst 9 Sep 2004 15:03:31 -0000 1.13 +++ Test/E01options.ztst 8 Aug 2005 17:11:30 -0000 @@ -975,6 +975,26 @@ > ?fn: foo: parameter not set + fn() { + emulate -L zsh + setopt warncreateglobal + foo1=bar1 + unset foo1 + foo1=bar2 + local foo2=bar3 + unset foo2 + foo2=bar4 + typeset -g foo3 + foo3=bar5 + fn2() { + foo3=bar6 + } + } + fn +0:WARN_CREATE_GLOBAL option +?fn:3: scalar parameter foo1 created globally in function +?fn:5: scalar parameter foo1 created globally in function + # This really just tests if XTRACE is egregiously broken. # To test it properly would need a full set of its own. fn() { print message; } -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************