diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/tex/generic/texapi/texapi.tex | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/generic/texapi/texapi.tex b/Master/texmf-dist/tex/generic/texapi/texapi.tex index 0312d1aeb42..2c81e5a729a 100644 --- a/Master/texmf-dist/tex/generic/texapi/texapi.tex +++ b/Master/texmf-dist/tex/generic/texapi/texapi.tex @@ -501,7 +501,7 @@ % FOR LOOPS % \newcount\pi@dofor_count -\newif\ifpi@dofor_noempty +\newife\ifpi@dofor_noempty \pdef\dofor{% \pi@dofor_noemptyfalse\pi@dofor_getlist } @@ -518,14 +518,11 @@ % We keep count so loops can be nested. \global\advance\pi@dofor_count1 \ifpi@dofor_noempty - \long\defcs{pi@dofor_loop\the\pi@dofor_count}#2{% + {\long\defcs{pi@dofor_loop\the\pi@dofor_count}#2{% \ifemptystring{##1} {\pi@dofor_control} - {#3\pi@newfor_markloop{pi@dofor_control}}% - }% - \else - \long\defcs{pi@dofor_loop\the\pi@dofor_count}#2{#3\pi@newfor_markloop{pi@dofor_control}}% - \fi + {#3\pi@newfor_markloop{pi@dofor_control}}}}% + {\long\defcs{pi@dofor_loop\the\pi@dofor_count}#2{#3\pi@newfor_markloop{pi@dofor_control}}}% \pi@dofor_control#1\pi@terminator } \def\pi@dofor_control{% @@ -640,20 +637,17 @@ #7###5\primunexpanded\expandafter{\pi@temp#8\pi@terminator}% }% \ifpi@dofor_noempty - \long\defcs{pi@newfor_userdefined:\commandtoname#1}#6#2{% + {\long\defcs{pi@newfor_userdefined:\commandtoname#1}#6#2{% \ifcs{pi@newfor_\detokenize{###5}_} {\pi@gobbletoterminator{#4}}% {\ifemptystring{###5} {\usecs{pi@newfor_userdefined:\commandtoname#1}#7} - {#3\pi@newfor_preloop\pi@newfor_markloop{pi@newfor_userdefined:\commandtoname#1}#7}}% - }% - \else - \long\defcs{pi@newfor_userdefined:\commandtoname#1}#6#2{% + {#3\pi@newfor_preloop\pi@newfor_markloop{pi@newfor_userdefined:\commandtoname#1}#7}}}}% + {\long\defcs{pi@newfor_userdefined:\commandtoname#1}#6#2{% \ifcs{pi@newfor_\detokenize{###5}_} {\pi@gobbletoterminator{#4}} {#3\pi@newfor_preloop\pi@newfor_markloop{pi@newfor_userdefined:\commandtoname#1}#7}% - }% - \fi + }}% \long\defcs{getargs@pi@newfor_userdefined:\commandtoname#1}#6###5\pi@newfor_preloop{% #9{\usecs{pi@newfor_userdefined:\commandtoname#1}#7}% }% |