zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: Really wierd problems with autoload
Date: Fri, 31 Mar 2000 09:29:07 +0200 (MET DST)	[thread overview]
Message-ID: <200003310729.JAA08390@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Thu, 30 Mar 2000 13:32:34 +0200 (MET DST)


I wrote:

> Bart Schaefer wrote:
> 
> ...
>
> > This used to work, but in 3.1.6-dev-20 when I type ESC-h I get
> > 
> > run-help:9: run-help: function definition file not found
> > 
> > Now, it's not run-help line 9, it's zman line 9;
> 
> That's because we do autoloading via the execautofn() function. For
> the execution code, the function currently active is the dummy
> function created for autoloading the real function.
> 
> The patch below makes doshfunc() set scriptname only if called for a
> real function and makes execautofn() handle the scriptname, too.

Grrrr, this didn't work for parse errors, of course.

Bye
 Sven

diff -ru ../z.old/Src/exec.c Src/exec.c
--- ../z.old/Src/exec.c	Fri Mar 31 09:18:49 2000
+++ Src/exec.c	Fri Mar 31 09:25:12 2000
@@ -3420,11 +3420,15 @@
 		d = (char *) zalloc(len + 1);
 		lseek(fd, 0, 0);
 		if (read(fd, d, len) == len) {
+		    char *oldscriptname = scriptname;
+
 		    close(fd);
 		    d[len] = '\0';
 		    d = metafy(d, len, META_REALLOC);
 
+		    scriptname = dupstring(s);
 		    r = parse_string(d, 1);
+		    scriptname = oldscriptname;
 
 		    zfree(d, len + 1);
 

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-03-31  7:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-31  7:29 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-03-30 11:32 Sven Wischnowsky
2000-03-30 15:32 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003310729.JAA08390@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).