about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-04-29 06:33:48 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-04-29 06:33:48 +0000
commit84963428416ba7cd8518d82b1899178178dfc1b4 (patch)
tree9f1d9e386bdb244601548e75031c707a5bc38fdf /Src/builtin.c
parentb7e5949279a4c5f08a8c1460345c05cdb193f5eb (diff)
downloadzsh-84963428416ba7cd8518d82b1899178178dfc1b4.tar.gz
zsh-84963428416ba7cd8518d82b1899178178dfc1b4.tar.xz
zsh-84963428416ba7cd8518d82b1899178178dfc1b4.zip
11015: `unfunction TRAPxxx' now works with localtraps in effect. I'm not
very happy with having to play with `noerrs' but I don't see any other way
to silence the warning from bin_unhash().
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 79648561e..6d9fcd493 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2592,12 +2592,14 @@ bin_unhash(char *name, char **argv, char *ops, int func)
 
     /* Take arguments literally -- do not glob */
     for (; *argv; argv++) {
+	int ne = noerrs;
 	if ((hn = ht->removenode(ht, *argv))) {
 	    ht->freenode(hn);
 	} else {
 	    zwarnnam(name, "no such hash table element: %s", *argv, 0);
-	    returnval = 1;
+	    returnval |= !noerrs;
 	}
+	noerrs = ne;
     }
     return returnval;
 }