From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3661 invoked by alias); 22 Feb 2015 13:18:13 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34603 Received: (qmail 3448 invoked from network); 22 Feb 2015 13:18:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [86.6.153.127] X-Spam: 0 X-Authority: v=2.1 cv=cpwVkjIi c=1 sm=1 tr=0 a=39NrsSuza2clQiZR/7fYWQ==:117 a=39NrsSuza2clQiZR/7fYWQ==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=q2GGsy2AAAAA:8 a=Z8aQtHi92v-toivtLDQA:9 a=CjuIK1q_8ugA:10 Date: Sun, 22 Feb 2015 13:18:04 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Builtin strftime and TZ assignments Message-ID: <20150222131804.7975cc04@ntlworld.com> In-Reply-To: <150221163922.ZM23297@torch.brasslantern.com> References: <150221102305.ZM26540@torch.brasslantern.com> <150221124546.ZM8579@torch.brasslantern.com> <20150221222712.49d49b88@ntlworld.com> <150221145441.ZM23213@torch.brasslantern.com> <20150221231614.3b871425@ntlworld.com> <150221163922.ZM23297@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 21 Feb 2015 16:39:22 -0800 Bart Schaefer 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