From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27864 invoked from network); 26 Jan 2009 06:18:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Jan 2009 06:18:31 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 33820 invoked from network); 26 Jan 2009 06:18:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jan 2009 06:18:28 -0000 Received: (qmail 18360 invoked by alias); 26 Jan 2009 06:18:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26443 Received: (qmail 18342 invoked from network); 26 Jan 2009 06:18:22 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 26 Jan 2009 06:18:22 -0000 Received: from mx.spodhuis.org (redoubt.spodhuis.org [193.202.115.177]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 2789F80271F0 for ; Mon, 26 Jan 2009 07:18:20 +0100 (CET) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=d200807; d=spodhuis.org; h=Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=xGSKd1lhCX+ZXjn55sxYxyFHCOp6w5c9heBn1+ZXK1Sb2XffxPp57ClnKNpjtSPvtJ0q++PTajPE3jazfzTgnGc2nZE6DK2tHvy8thF7SkWv0R0I6uBvGMs4iKEU3XmPp4YG0x7v/Jg8YJjGXWEhMq8J9U581JJmaNOyf30rKf4=; Received: by smtp.spodhuis.org with local id 1LRKnb-000E8Z-QA; Mon, 26 Jan 2009 06:18:19 +0000 Date: Sun, 25 Jan 2009 22:18:19 -0800 From: Phil Pennock To: zsh-workers@sunsite.dk Subject: Re: sourcing a sh file in zsh Message-ID: <20090126061819.GB54012@redoubt.spodhuis.org> Mail-Followup-To: zsh-workers@sunsite.dk References: <200901161939.54651.arvidjaar@newmail.ru> <090116102934.ZM22119@torch.brasslantern.com> <200901241859.30029.arvidjaar@gmail.com> <20090124173836.64403fdc@pws-pc> <090124152643.ZM24163@torch.brasslantern.com> <20090125213946.4c868e74@pws-pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090125213946.4c868e74@pws-pc> X-Virus-Scanned: ClamAV 0.92.1/8902/Mon Jan 26 05:21:29 2009 on bifrost X-Virus-Status: Clean On 2009-01-25 at 21:39 +0000, Peter Stephenson wrote: > On Sat, 24 Jan 2009 15:26:43 -0800 > Bart Schaefer wrote: > > } There's still the issue of retaining the emulation mode for functions > > } defined in that mode; I agree we really ought to tackle that to make > > } the new functionality properly useful. I expect Bart has ideas on the > > } next step; how far will we need to go? > > > > I refer you to workers/26336 where Phil makes some comments about how > > he'd modify the wordcode to handle this. > > I can't offhand think of a case that needs to be that complicated. > Either you run a chunk of code using "emulate", or you have a shell > function, possibly defined in such a chunk, where sticking the flags in > the shfunc structure for future reference is good enough. Where would > you need something more than that? I need to sit down and trace out the mechanics of the existing code to understand the ways that invocation of a function can occur. What I wrote was: ----------------------------8< cut here >8------------------------------ The problem is how to decide if a function needs a new option; I haven't looked too closely but I believe that functions are invoked from each other directly via the Eprog code, rather than dispatch through the shfunctab shfunc entries, so it's not viable to go via extending shfunc (pity). ----------------------------8< cut here >8------------------------------ If I was wrong, and all function invocation goes via the shfunc entries, then (a) that's much easier and (b) I'm very happy. -Phil