diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv index 89c7699deb5..61e3523e667 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/meta-ini.mkiv @@ -97,7 +97,7 @@ \ifx\currentMPinstance\empty \let\currentMPinstance\defaultMPinstance \fi - \gtoksapp\t_meta_definitions{#2}% + \global\t_meta_definitions\expandafter{\the\t_meta_definitions#2}% \let\currentMPinstance\m_meta_saved_instance} \let\stopMPdefinitions\relax @@ -111,7 +111,7 @@ \let\stopMPextensions\relax \unexpanded\def\startMPinitializations#1\stopMPinitializations % for all instances, when enabled - {\gtoksapp\t_meta_initializations{#1}} + {\global\t_meta_initializations\expandafter{\the\t_meta_initializations#1}} \let\stopMPinitializations\relax @@ -131,7 +131,7 @@ \ifx\m_meta_option\!!plustoken \else \global\t_meta_inclusions\emptytoks \fi - \gtoksapp\t_meta_inclusions{#2}% + \global\t_meta_inclusions\expandafter{\the\t_meta_inclusions#2}% \let\currentMPinstance\m_meta_saved_instance} \let\stopMPinclusions\relax @@ -152,7 +152,7 @@ \ifx\m_meta_option\!!plustoken \else \global\t_meta_inclusions\emptytoks \fi - \gtoksapp\t_meta_inclusions{#2}% + \global\t_meta_inclusions\expandafter{\the\t_meta_inclusions#2}% \let\currentMPinstance\m_meta_saved_instance} \installcommandhandler \??mpinstance {MPinstance} \??mpinstance @@ -211,7 +211,6 @@ \def\currentMPformat {\currentMPinstance} \defineMPinstance[metafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes] -\defineMPinstance[minifun] [\s!format=minifun,\s!extensions=\v!yes,\s!initializations=\v!yes] \defineMPinstance[extrafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes] \defineMPinstance[lessfun] [\s!format=metafun] \defineMPinstance[doublefun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!double] @@ -276,13 +275,11 @@ \endgroup} \def\meta_process_graphic_start - {\pushMPboundingbox - \setbox\b_meta_graphic\hpack\bgroup} + {\setbox\b_meta_graphic\hpack\bgroup} \def\meta_process_graphic_stop {\egroup - \meta_place_graphic - \popMPboundingbox} + \meta_place_graphic} \unexpanded\def\meta_process_graphic_instance#1% {\edef\currentMPinstance{#1}% @@ -368,12 +365,12 @@ \let\MPdrawingdata\empty \unexpanded\def\resetMPdrawing - {\glet\MPdrawingdata\empty + {\global\let\MPdrawingdata\empty \global\MPdrawingdonefalse} \unexpanded\def\pushMPdrawing {\globalpushmacro\MPdrawingdata - \glet\MPdrawingdata\empty} + \global\let\MPdrawingdata\empty} \unexpanded\def\popMPdrawing {\globalpopmacro\MPdrawingdata} @@ -731,7 +728,7 @@ % \def\meta_start_use_graphic#1#2#3\stopuseMPgraphic % %{\setgvalue{\??mpgraphic#1}{\meta_handle_use_graphic{#1}{#2}{#3}}} % %{\setxvalue{\??mpgraphic#1}{\noexpand\meta_handle_use_graphic{#1}{\normalunexpanded{#2}}{\normalunexpanded{#3}}}} -% {\expandafter\gdef\csname\??mpgraphic#1\expandafter\endcsname\expandafter{\expandafter\meta_handle_use_graphic\expandafter{\normalexpanded{#1}}{#2}{#3}}} +% {\global\expandafter\gdef\csname\??mpgraphic#1\expandafter\endcsname\expandafter{\expandafter\meta_handle_use_graphic\expandafter{\normalexpanded{#1}}{#2}{#3}}} % % cleaner: @@ -788,28 +785,11 @@ \unexpanded\def\useMPgraphic {\dodoublegroupempty\meta_use_graphic} -% \def\meta_use_graphic#1#2% -% {\meta_begin_graphic_group{#1}% -% %\doifsomething{#2}{\setupMPvariables[\currentMPgraphicname][#2]}% -% \doifsomething{#2}{\setupMPvariables[#1][#2]}% -% \csname\??mpgraphic#1\endcsname\empty -% \meta_end_graphic_group} - \def\meta_use_graphic#1#2% {\meta_begin_graphic_group{#1}% - \ifcsname\??mpgraphic#1\endcsname - \edef\usedMPgraphicname{#1}% - \else\ifcsname\??mpgraphic\currentMPgraphicname\endcsname - \let\usedMPgraphicname\currentMPgraphicname - \else - \let\usedMPgraphicname\empty - \fi\fi - \ifx\usedMPgraphicname\empty - % message - \else - \doifsomething{#2}{\setupMPvariables[\usedMPgraphicname][#2]}% - \csname\??mpgraphic\usedMPgraphicname\endcsname - \fi +% \doifsomething{#2}{\setupMPvariables[\currentMPgraphicname][#2]}% + \doifsomething{#2}{\setupMPvariables[#1][#2]}% + \csname\??mpgraphic#1\endcsname\empty \meta_end_graphic_group} \let\reuseMPgraphic \useMPgraphic % we can save a setup here if needed @@ -881,6 +861,19 @@ {\meta_prepare_instance_variable{#1}% \edef\overlaystamp{\overlaystamp:\MPvariable{#1}}} +%D \macros +%D {MPdatafile} +%D +%D We redefine a macro from \type {supp-mps.tex}: + +% This will change ... + +\def\MPdataMPYfile{\jobname-mpgraph.mpy} + +\startMPextensions + def data_mpy_file = "\noexpand\MPdataMPYfile" enddef ; +\stopMPextensions + \unexpanded\def\getMPdata {\clf_getMPdata} \let\rawMPdata \clf_getMPdata |