1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-16 11:20:54 +01:00

31444: Basic code for enable/disable -p

This commit is contained in:
Peter Stephenson 2013-06-13 18:38:33 +01:00
parent e36e7d9ade
commit fdf2867e5f
8 changed files with 313 additions and 12 deletions

View file

@ -4627,6 +4627,7 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
}
starttrapscope();
startpatternscope();
pptab = pparams;
if (!(flags & PM_UNDEFINED))
@ -4674,6 +4675,8 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
offptr++)
opts[*offptr] = 0;
}
/* All emulations start with pattern disables clear */
clearpatterndisables();
} else
restore_sticky = 0;
@ -4774,6 +4777,8 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
scriptname = oldscriptname;
oflags = ooflags;
endpatternscope(); /* before restoring old LOCALPATTERNS */
if (restore_sticky) {
/*
* If we switched to an emulation environment just for