Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: failed autoload

It can't be correct that if an autoload fails beacause of a syntax error
that the function returns 0.

I don't see how it can be useful to define the function with an empty
function body, either.

Index: Src/exec.c
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.50
diff -u -r1.50 exec.c
--- Src/exec.c	2 May 2003 10:25:32 -0000	1.50
+++ Src/exec.c	1 Jul 2003 18:19:03 -0000
@@ -3339,7 +3339,7 @@
 	return NULL;
     if (!prog)
-	prog = &dummy_eprog;
+	return NULL;
     if (ksh == 2 || (ksh == 1 && isset(KSHAUTOLOAD))) {
 	if (autol) {
 	    prog->flags |= EF_RUN;

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

Messages sorted by: Reverse Date, Date, Thread, Author