mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-25 17:20:25 +02:00
26546, 26556: sticky emulation for functions defined in emulate ... -c ...
environments, plus documentation
This commit is contained in:
parent
0d02cf343e
commit
c7d8b0dfb8
16 changed files with 322 additions and 69 deletions
|
|
@ -706,6 +706,7 @@ dosavetrap(int sig, int level)
|
|||
newshf->node.flags = shf->node.flags;
|
||||
newshf->funcdef = dupeprog(shf->funcdef, 0);
|
||||
newshf->filename = ztrdup(shf->filename);
|
||||
newshf->emulation = shf->emulation;
|
||||
if (shf->node.flags & PM_UNDEFINED)
|
||||
newshf->funcdef->shf = newshf;
|
||||
}
|
||||
|
|
@ -1201,7 +1202,7 @@ dotrapargs(int sig, int *sigtr, void *sigfn)
|
|||
/* return triggered */
|
||||
retflag = 1;
|
||||
} else {
|
||||
if (traperr && emulation != EMULATE_SH)
|
||||
if (traperr && !EMULATION(EMULATE_SH))
|
||||
lastval = 1;
|
||||
if (try_tryflag)
|
||||
errflag = traperr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue