From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh-workers@zsh.org
Subject: PATCH: Disable WARN_CREATE_GLOBAL in 'zstyle -e' code
Date: Sun, 21 Feb 2010 16:09:45 +0100 [thread overview]
Message-ID: <1266764985-20371-1-git-send-email-ft@bewatermyfriend.org> (raw)
In-Reply-To: <1266764004-15068-1-git-send-email-ft@bewatermyfriend.org>
[...]
> c) Disable `warn_create_global' in code executed by "zstyle -e". Or
> make `reply' and `REPLY' special in that case. Or whatever makes the
> most sense.
>
> This patch does what "a)" suggests, basically because it works and I was
> lazy. I think "c)" would be the cleanest solution, but I don't know if
> that's doable and I haven't looked at the involved code yet.
[...]
This does "c)". I think this shouldn't break anything. So, I think it's
correct and should be preferable to setting NO_warn_create_global in
vcs_info.
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..2d8c61a 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
next prev parent reply other threads:[~2010-02-21 15:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-21 14:53 PATCH: vcs_info: Set NO_warn_create_global option Frank Terbeck
2010-02-21 15:09 ` Frank Terbeck [this message]
2010-02-21 15:18 ` PATCH: Disable WARN_CREATE_GLOBAL in 'zstyle -e' code Frank Terbeck
2010-02-21 17:25 ` PATCH: vcs_info: Set NO_warn_create_global option Bart Schaefer
2010-02-21 20:06 ` Frank Terbeck
2010-02-21 21:17 ` Bart Schaefer
2010-02-21 21:34 ` Frank Terbeck
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=1266764985-20371-1-git-send-email-ft@bewatermyfriend.org \
--to=ft@bewatermyfriend.org \
--cc=zsh-workers@zsh.org \
/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).