summary refs log tree commit diff
path: root/Src/module.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2001-05-18 15:23:08 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2001-05-18 15:23:08 +0000
commit4544933427065dea3834753ea29c18610f3ef8ea (patch)
treebd9104df76fe3167a0100292591181cc5f6ced30 /Src/module.c
parent11e31474665c0ca7f689457633f72483f3f9f2ad (diff)
downloadzsh-4544933427065dea3834753ea29c18610f3ef8ea.tar.gz
zsh-4544933427065dea3834753ea29c18610f3ef8ea.tar.xz
zsh-4544933427065dea3834753ea29c18610f3ef8ea.zip
fix zmodload -uf for not-yet-loaded function
Diffstat (limited to 'Src/module.c')
-rw-r--r--Src/module.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Src/module.c b/Src/module.c
index cd68627ae..f8b3f2758 100644
--- a/Src/module.c
+++ b/Src/module.c
@@ -1346,7 +1346,7 @@ bin_zmodload_math(char *nam, char **args, char *ops)
     int ret = 0;
 
     if (ops['u']) {
-	/* remove autoloaded conditions */
+	/* remove autoloaded math functions */
 	for (; *args; args++) {
 	    MathFunc f = getmathfunc(*args, 0);
 
@@ -1355,7 +1355,7 @@ bin_zmodload_math(char *nam, char **args, char *ops)
 		    zwarnnam(nam, "%s: no such math function", *args, 0);
 		    ret = 1;
 		}
-	    } else if (f->flags & CONDF_ADDED) {
+	    } else if (f->flags & MFF_ADDED) {
 		zwarnnam(nam, "%s: math function is already defined", *args, 0);
 		ret = 1;
 	    } else
@@ -1377,7 +1377,7 @@ bin_zmodload_math(char *nam, char **args, char *ops)
 	}
 	return 0;
     } else {
-	/* add autoloaded conditions */
+	/* add autoloaded math functions */
 	char *modnam;
 
 	modnam = *args++;
@@ -2119,6 +2119,8 @@ add_automathfunc(char *nam, char *module)
 
 	return 1;
     }
+    f->flags &= ~MFF_ADDED; /* still to autoload, not added yet */
+
     return 0;
 }