zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Builtin strftime and TZ assignments
Date: Sun, 22 Feb 2015 13:18:04 +0000	[thread overview]
Message-ID: <20150222131804.7975cc04@ntlworld.com> (raw)
In-Reply-To: <150221163922.ZM23297@torch.brasslantern.com>

On Sat, 21 Feb 2015 16:39:22 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> Yes; I assumed incorrectly that passing PM_LOCAL in the flags would cause
> createparam() to assign pm->level = locallevel, but obviously I should
> have explicitly checked that.  (Why does it not?)

Up to now the assignment of local level has been associated with the
"local" command etc., which is what the user sees when declaring the
parameter local, rather than the internal flag.  To decide which is
better you'd have to survey all the uses and see which way gave you the
best match.

I think the PM_LOCAL flag (or maybe some equivalent predecessor) came
about because we were caught between the fact that the "typeset" family
usually made things local and the fact that "export" traditionally
didn't, so we needed an extra way of signalling the difference.  Then
along came the -g option and we needed a way of signalling that, too.
The level was the primary way of signalling whether a parameter needed
removing at the end of the scope and the flag was an additional
convenience.

All this logic got piled into bin_typeset() rather than the core
parameter code, and as I was saying a couple of weeks ago the split
doesn't work very well for many of the internal uses of parameter logic.
Logically, I would guess you don't actually need both: level 0 should
mean global, but the level doesn't appear in the interface to the core
parameter code.

pws


      parent reply	other threads:[~2015-02-22 13:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADjGqHvaOkB-T_qGHDvt9=8TzSGiR8-FptXCX8VNFyfPkmJN-g@mail.gmail.com>
     [not found] ` <CABx2=D9e8KPMd9fxL5UY5BoVOdnNyMx-d2tR3v_4Gmd7V5m7DQ@mail.gmail.com>
     [not found]   ` <150221102305.ZM26540@torch.brasslantern.com>
2015-02-21 20:45     ` Bart Schaefer
2015-02-21 22:04       ` Bart Schaefer
2015-02-21 22:27       ` Peter Stephenson
2015-02-21 22:54         ` Bart Schaefer
2015-02-21 23:16           ` Peter Stephenson
2015-02-22  0:39             ` Bart Schaefer
2015-02-22  3:53               ` Bart Schaefer
2015-02-22 13:18               ` Peter Stephenson [this message]

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=20150222131804.7975cc04@ntlworld.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /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).