summaryrefslogtreecommitdiff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-08-27 17:40:41 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-08-27 17:40:41 +0200
commit6f1dd991eb95cc2049a667960fc3eedb78845646 (patch)
tree4ab413ba9978c243019e14bab92fdf5a9a5bb4b9 /Src/builtin.c
parent5c3b312cdeac0ae3f3f6b71f3dbc69bf18000d88 (diff)
parent2663a0310f03e62a4439602158b956ec08e3f4fd (diff)
downloadzsh-6f1dd991eb95cc2049a667960fc3eedb78845646.tar.gz
zsh-6f1dd991eb95cc2049a667960fc3eedb78845646.zip
Merge tag 'zsh-5.0.8-test-3' into debian
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 3d34aa74c..97022addf 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -5465,8 +5465,8 @@ bin_emulate(UNUSED(char *nam), char **argv, Options ops, UNUSED(int func))
/* with single argument set current emulation */
if (!argv[1]) {
- emulate(shname, OPT_ISSET(ops,'R'), &emulation, opts);
- if (OPT_ISSET(ops,'L'))
+ emulate(shname, opt_R, &emulation, opts);
+ if (opt_L)
opts[LOCALOPTIONS] = opts[LOCALTRAPS] = opts[LOCALPATTERNS] = 1;
clearpatterndisables();
return 0;
@@ -5476,7 +5476,7 @@ bin_emulate(UNUSED(char *nam), char **argv, Options ops, UNUSED(int func))
memcpy(saveopts, opts, sizeof(opts));
memcpy(new_opts, opts, sizeof(opts));
savehackchar = keyboardhackchar;
- emulate(shname, OPT_ISSET(ops,'R'), &new_emulation, new_opts);
+ emulate(shname, opt_R, &new_emulation, new_opts);
optlist = newlinklist();
if (parseopts("emulate", &argv, new_opts, &cmd, optlist)) {
ret = 1;
@@ -5508,8 +5508,11 @@ bin_emulate(UNUSED(char *nam), char **argv, Options ops, UNUSED(int func))
goto restore2;
}
*--argv = cmd; /* on stack, never free()d, see execbuiltin() */
- } else
+ } else {
+ if (opt_L)
+ opts[LOCALOPTIONS] = opts[LOCALTRAPS] = opts[LOCALPATTERNS] = 1;
return 0;
+ }
save_sticky = sticky;
sticky = hcalloc(sizeof(*sticky));