1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

26546, 26556: sticky emulation for functions defined in emulate ... -c ...

environments, plus documentation
This commit is contained in:
Peter Stephenson 2009-02-11 20:42:15 +00:00
parent 0d02cf343e
commit c7d8b0dfb8
16 changed files with 322 additions and 69 deletions

View file

@ -78,7 +78,7 @@ boot_(UNUSED(Module m))
0 };
const char **sp;
if (emulation != EMULATE_ZSH)
if (!EMULATION(EMULATE_ZSH))
return 0;
if (!dotdir) {

View file

@ -289,6 +289,7 @@ setfunction(char *name, char *val, int dis)
shf = (Shfunc) zshcalloc(sizeof(*shf));
shf->funcdef = dupeprog(prog, 0);
shf->node.flags = dis;
shf->emulation = sticky_emulation;
if (!strncmp(name, "TRAP", 4) &&
(sn = getsignum(name + 4)) != -1) {