zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "martin f. krafft" <madduck@debian.org>, zsh-workers@sunsite.dk
Cc: "martin f. krafft" <madduck@madduck.net>
Subject: Re: [PATCH] typeset reply array
Date: Sun, 18 May 2008 09:40:27 -0700	[thread overview]
Message-ID: <080518094029.ZM3937@torch.brasslantern.com> (raw)
In-Reply-To: <20080518053301.GA8521@scru.org>

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.

-- 


  reply	other threads:[~2008-05-18 16:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1211026277-27464-1-git-send-email-madduck@debian.org>
     [not found] ` <1211026277-27464-2-git-send-email-madduck@debian.org>
     [not found]   ` <1211025324-25630-1-git-send-email-madduck@debian.org>
2008-05-18  5:33     ` Clint Adams
2008-05-18 16:40       ` Bart Schaefer [this message]
2008-05-18 16:49         ` martin f krafft
2008-05-18 17:17       ` Peter Stephenson
2008-05-18 19:23         ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=080518094029.ZM3937@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=madduck@debian.org \
    --cc=madduck@madduck.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).