From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6681 invoked from network); 15 Dec 1998 17:09:40 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 15 Dec 1998 17:09:40 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA14852; Tue, 15 Dec 1998 12:07:40 -0500 (EST) Resent-Date: Tue, 15 Dec 1998 12:07:40 -0500 (EST) From: "Bart Schaefer" Message-Id: <981215090540.ZM7090@candle.brasslantern.com> Date: Tue, 15 Dec 1998 09:05:40 -0800 In-Reply-To: <199812151203.NAA10980@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: wrapper functions in modules" (Dec 15, 1:03pm) References: <199812151203.NAA10980@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Sven Wischnowsky , zsh-workers@math.gatech.edu Subject: Re: wrapper functions in modules MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"XnFMO2.0._d3.STfTs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4809 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Dec 15, 1:03pm, Sven Wischnowsky wrote: } Subject: Re: wrapper functions in modules } } Bart Schaefer wrote: } > Is the new first parameter of doshfunc() needed any longer? } } [For those who don't want to look at the code: the argument is the } name of the function to be executed.] } } I added the argument since modules may be interested in it Hm. I'm not sure that modules *ought* to be interested in it, but ... One thing a wrapper function might legitimately be interested in is the context in which it was called. By that I mean, the wrapper might want to do something different if the function is being run by the completion widget code (the call to doshfunc() in zle_main.c), the compctl -K code or -Y code (zle_tricky.c), or the signal traps (signals.c). The signal handlers can sort of be determined by examination of the name, but that's not what I'd call the best way to do it (e.g. it's possible to invoke the trap functions manually without a signal having been received), and that doesn't work for the other cases. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com