From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23127 invoked from network); 10 Jul 2001 16:08:37 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Jul 2001 16:08:37 -0000 Received: (qmail 18932 invoked by alias); 10 Jul 2001 16:08:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15364 Received: (qmail 18919 invoked from network); 10 Jul 2001 16:08:30 -0000 From: "Bart Schaefer" Message-Id: <1010710160616.ZM29244@candle.brasslantern.com> Date: Tue, 10 Jul 2001 16:06:16 +0000 In-Reply-To: <200107100942.LAA17143@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: PATCH: doshfunc" (Jul 10, 11:42am) References: <200107100942.LAA17143@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: Sven Wischnowsky , zsh-workers@sunsite.dk Subject: Re: PATCH: doshfunc MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 10, 11:42am, Sven Wischnowsky wrote: } Subject: Re: PATCH: doshfunc } } Bart Schaefer wrote: } } > foo () { } > bar () { } > print oops } > } } > foo "$@" } > } } > } > Something has magically supplied the `foo "$@"' at the end of the file! } } It's eval_autoload() -- which you wrote this way in 8404 ;-) No, it's not eval_autoload(): 2122 if (!(shf->flags & PM_UNDEFINED)) (gdb) n 2125 if (shf->funcdef) { (gdb) 2126 freeeprog(shf->funcdef); (gdb) 2127 shf->funcdef = &dummy_eprog; (gdb) 2129 if (ops['X'] == 1) { (gdb) 2138 return !loadautofn(shf, (ops['k'] ? 2 : (ops['z'] ? 0 : 1)), 1); The code that does `name "$@"' in eval_autoload() is assembling a command to pass to bin_eval(). It doesn't append anything to the function def'n. } > ... } > } > So I still can't reach the `goto doneshfunc'. } } You were asking about EF_RUN, that's what I tried to explain. Right, I asked about EF_RUN because that error message is inside an `if (prog->flags & EF_RUN)'. } If you want that error message: } } % echo 'bar() { echo foobar }' >foo } % zcompile -k foo } % fpath=(. $fpath) } % autoload foo } % foo } zsh: foo: function not defined by file That error message came from line 3253, not line 3381. } or: } } % rm -f foo.zwc } % echo 'bar() { echo foobar }' >foo } % setopt kshautoload } % fpath=(. $fpath) } % autoload foo } % foo } zsh: foo: function not defined by file Same thing there; the error is from line 3253. Once again, what I want to know is how you reach line 3372 with EF_RUN in the Eprog flags, and hence get the error from line 3381. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net