From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4819 invoked from network); 12 Apr 2004 15:59:53 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 Apr 2004 15:59:53 -0000 Received: (qmail 8769 invoked by alias); 12 Apr 2004 15:59:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19759 Received: (qmail 8677 invoked from network); 12 Apr 2004 15:59:47 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 12 Apr 2004 15:59:47 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 12 Apr 2004 15:59:46 -0000 Received: (qmail 21990 invoked from network); 12 Apr 2004 15:59:46 -0000 Received: from wbar3.sjo1-4-11-009-147.sjo1.dsl-verizon.net (HELO candle.brasslantern.com) (4.11.9.147) by a.mx.sunsite.dk with SMTP; 12 Apr 2004 15:59:44 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i3CFxg519036 for zsh-workers@sunsite.dk; Mon, 12 Apr 2004 08:59:42 -0700 From: Bart Schaefer Message-Id: <040412085942.ZM19035@candle.brasslantern.com> Date: Mon, 12 Apr 2004 08:59:42 -0700 In-Reply-To: <1170.1081778412@athlon> Comments: In reply to Oliver Kiddle "Re: Compsys and KSH_AUTOLOAD" (Apr 12, 4:00pm) References: <1040410174430.ZM10891@candle.brasslantern.com> <1170.1081778412@athlon> X-Mailer: Z-Mail Lite (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: Compsys and KSH_AUTOLOAD MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: **** X-Spam-Status: No, hits=4.7 required=6.0 tests=RCVD_IN_DYNABLOCK, RCVD_IN_NJABL,RCVD_IN_NJABL_DIALUP,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 4.7 On Apr 12, 4:00pm, Oliver Kiddle wrote: > > Bart wrote: > > tried the "zcompile -z" stuff (actually the zrecompile loop) suggested > > in the manual, but it didn't work for him (I haven't investigated that > > It is only for compinit itself that I can get problems with that to > occur. It seems to be a little sensitive about the contents of $fpath Matthias has since written back to me again and says he's having all sorts of problems with zcompile'd functions even after starting from scratch and with ksh_autoload turned off. So the issue of documenting the "correct" way to use compsys with kshautoload is separate. > > autoload +X -z compinit _main_complete _complete_help _complete_debug \ > > _expand_alias _bash_completions _history_complete_word _next_tags > > > (1) Does this deserve a FAQ entry, or perhaps even a change to the > > compsys documentation? I guess ksh_autoload isn't a very "frequently" > > It'd be better if we can get it to just work. I don't specifically mean "does the above workaround deserve a FAQ entry" but rather "does using compsys with kshautoload deserve a FAQ entry", whatever the best A to the Q turns out to be. > Is there any reason why the -z and -k options to autoload can only be > used with +X The autoload method used isn't stored anywhere in the function structure. Only the fact that the function is not yet defined is stored, and then zsh applies whatever autoload setting is in effect globally at the time that the function is loaded. I suppose we could modify the storage and the code that does autoloading [as opposed to modifying only bin_autoload()]; I forget why I didn't do so at the time -- probably because it was a significantly larger change. > It would seem to me that the best would be if compinit could use > `autoload -U -z' with functions being setup to look like this: > > _autoload () { > # undefined > builtin autoload -XUz > } Please note that undefined functions don't actually have any function body at all. The "functions" command creates a dummy body when it outputs a function that has no definition. So it's not just a matter of changing the dummy body.