From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18471 invoked from network); 18 May 2008 16:41:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 May 2008 16:41:01 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 82148 invoked from network); 18 May 2008 16:40:55 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 May 2008 16:40:55 -0000 Received: (qmail 11990 invoked by alias); 18 May 2008 16:40:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25064 Received: (qmail 11974 invoked from network); 18 May 2008 16:40:51 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 18 May 2008 16:40:51 -0000 Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by bifrost.dotsrc.org (Postfix) with ESMTP id B1E5380589A4 for ; Sun, 18 May 2008 18:40:42 +0200 (CEST) Received: from torch.brasslantern.com ([71.116.113.54]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K1200513OZK9QRA@vms044.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 18 May 2008 11:40:33 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id m4IGeUgM003939; Sun, 18 May 2008 09:40:31 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id m4IGeTxs003938; Sun, 18 May 2008 09:40:29 -0700 Date: Sun, 18 May 2008 09:40:27 -0700 From: Bart Schaefer Subject: Re: [PATCH] typeset reply array In-reply-to: <20080518053301.GA8521@scru.org> To: "martin f. krafft" , zsh-workers@sunsite.dk Cc: "martin f. krafft" Message-id: <080518094029.ZM3937@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <1211026277-27464-1-git-send-email-madduck@debian.org> <1211026277-27464-2-git-send-email-madduck@debian.org> <1211025324-25630-1-git-send-email-madduck@debian.org> <20080518053301.GA8521@scru.org> Comments: In reply to Clint Adams "Re: [PATCH] typeset reply array" (May 18, 5:33am) X-Virus-Scanned: ClamAV 0.91.2/7149/Sun May 18 16:40:15 2008 on bifrost X-Virus-Status: Clean On May 18, 5:33am, Clint Adams wrote: } } I think that some of these will break things. (Stylistically, "local" or "declare" should probably be used instead of "typeset" when the intent is to make local parameters.) The right thing to do (if there is a right thing) is use "typeset -g ..." to explicitly create them as globals where appropriate. This suppresses the warning without changing the behavior. On the other hand I think zsh could make reply/REPLY into particular exceptions to the warning. Although they're not "special parameters" in the true sense, it's also the case that they're never (or always, depending on your point of view) intended to be local to the scope where they're assigned. It's not safe to use them for anything but their reserved purpose because they'll get cleared in the internals if any operation that may employ them is called. --