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

PATCH: Disable WARN_CREATE_GLOBAL in 'zstyle -e' code



This time with correct indention...

Regards, Frank
---
 Src/Modules/zutil.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c
index 698b7e3..443cb26 100644
--- a/Src/Modules/zutil.c
+++ b/Src/Modules/zutil.c
@@ -340,15 +340,22 @@ static char **
 evalstyle(Stypat p)
 {
     int ef = errflag;
+    int reset = 0;
     char **ret, *str;
 
     unsetparam("reply");
+    if (isset(WARNCREATEGLOBAL)) {
+	reset = 1;
+	dosetopt(WARNCREATEGLOBAL, 0, 0);
+    }
     execode(p->eval, 1, 0);
     if (errflag) {
 	errflag = ef;
 	return NULL;
     }
     errflag = ef;
+    if (reset)
+	dosetopt(WARNCREATEGLOBAL, 1, 0);
 
     queue_signals();
     if ((ret = getaparam("reply")))
-- 
1.7.0



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