summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/meta-mac.mkxl
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/meta-mac.mkxl')
-rw-r--r--tex/context/base/mkiv/meta-mac.mkxl49
1 files changed, 14 insertions, 35 deletions
diff --git a/tex/context/base/mkiv/meta-mac.mkxl b/tex/context/base/mkiv/meta-mac.mkxl
index 7ced2aff9..76b7396ae 100644
--- a/tex/context/base/mkiv/meta-mac.mkxl
+++ b/tex/context/base/mkiv/meta-mac.mkxl
@@ -13,40 +13,16 @@
\unprotect
-\unexpanded\def\defineMPparameterset[#1]{\clf_lmt_parameters_define{#1}}
-\unexpanded\def\presetMPparameters [#1]{\clf_lmt_parameters_preset{#1}}
-\unexpanded\def\resetMPparameters [#1]{\clf_lmt_parameters_reset {#1}}
+\permanent\protected\def\defineMPparameterset[#1]{\clf_lmt_parameters_define{#1}}
+\permanent\protected\def\presetMPparameters [#1]{\clf_lmt_parameters_preset{#1}}
+\permanent\protected\def\resetMPparameters [#1]{\clf_lmt_parameters_reset {#1}}
-% \unexpanded\def\useMPgraphic
-% {\doifnextoptionalelse\meta_use_MP_graphic_yes\meta_use_MP_graphic_nop}
-
-% \def\meta_use_MP_graphic_nop
-% {\dodoublegroupempty\meta_use_graphic}
-
-% \def\meta_use_MP_graphic_yes
-% {\dodoubleempty\meta_use_graphic_new}
-
-% \def\meta_use_graphic_new[#1][#2]%
-% {\begingroup
-% % If really needed weh can use grouplevel but normally these graphics are
-% % not nested.
-% \clf_lmt_parameters_preset{#1}[#2]%
-% \meta_use_graphic{#1}{}%
-% \clf_lmt_parameters_reset{#1}%
-% \endgroup}
-
-\unexpanded\def\useMPmacro
- {\dotripleempty\meta_use_macro}
-
-\def\meta_use_macro[#1][#2][#3]%
- {\ifthirdargument
- \meta_begin_graphic_group{#1}%
+\permanent\tolerant\protected\def\useMPmacro[#1]#*[#2]#*[#3]%
+ {\ifarguments\or
+ \let\currentMPinstance\defaultMPinstance
\meta_enable_include
- \clf_lmt_parameters_preset{#2}[#3]%
- \meta_process_graphic{lmt_#2;}%
- \clf_lmt_parameters_reset{#2}%
- \meta_end_graphic_group
- \orelse\ifsecondargument
+ \meta_process_graphic{lmt_#1;}%
+ \or
\doifelseassignment{#2}
{\let\currentMPinstance\defaultMPinstance
\meta_enable_include
@@ -57,10 +33,13 @@
\meta_enable_include
\meta_process_graphic{lmt_#1;}%
\meta_end_graphic_group}%
- \else
- \let\currentMPinstance\defaultMPinstance
+ \or
+ \meta_begin_graphic_group{#1}%
\meta_enable_include
- \meta_process_graphic{lmt_#1;}%
+ \clf_lmt_parameters_preset{#2}[#3]%
+ \meta_process_graphic{lmt_#2;}%
+ \clf_lmt_parameters_reset{#2}%
+ \meta_end_graphic_group
\fi}
\protect