diff options
Diffstat (limited to 'tex/context/base/core-sys.mkiv')
-rw-r--r-- | tex/context/base/core-sys.mkiv | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/tex/context/base/core-sys.mkiv b/tex/context/base/core-sys.mkiv index 66f2a4380..5a92ebf4f 100644 --- a/tex/context/base/core-sys.mkiv +++ b/tex/context/base/core-sys.mkiv @@ -150,14 +150,34 @@ %D But anyway, in \MKIV\ we avoid most of the complications anyway as we %D deal with much at the \LUA\ end. -\def\complexstart[#1]{\bgroup\getvalue{\e!start#1}} -\def\complexstop [#1]{\getvalue{\e!stop #1}\egroup} - -\let\simplestart\bgroup -\let\simplestop \egroup - -\definecomplexorsimple\start -\definecomplexorsimple\stop +\unexpanded\def\start + {\dosingleempty\syst_start} + +\def\syst_start + {\bgroup + \iffirstargument + \expandafter\syst_start_yes + \else + \expandafter\syst_start_nop + \fi} + +\def\syst_start_yes[#1]% + {\edef\m_syst_start_stop{#1}% + \ifx\m_syst_start_stop\empty + \let\syst_stop_indeed\donothing + \else\ifcsname\e!start\m_syst_start_stop\endcsname + \let\expandafter\syst_stop_indeed\csname\e!stop\m_syst_start_stop\endcsname + \csname\e!start\currentstartstop\expandafter\expandafter\expandafter\endcsname + \else + \let\syst_stop_indeed\donothing + \fi\fi} + +\def\syst_start_nop[#1]% + {\let\syst_stop_indeed\donothing} + +\unexpanded\def\stop + {\syst_stop_indeed + \egroup} % \c!before \c!after \c!inbetween \c!commands \c!style \c!color |