diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
commit | 5c6357cdb820b4f628d036ba7b2248f221d50c0b (patch) | |
tree | 6365552f2737faaffe63a395272da242ee2c4f03 /Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv | |
parent | b4568bc71e054f3d1fd6404b45d2322631778284 (diff) |
ConTeXt version 2019.02.22 19:35
git-svn-id: svn://tug.org/texlive/trunk@50086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv | 127 |
1 files changed, 78 insertions, 49 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv index 872d27e7726..da5a3a3109f 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/luat-ini.mkiv @@ -265,55 +265,84 @@ % \def\syst_helpers_checked_stripped_csname#1% % {\if\noexpand#1\letterbackslash\else#1\fi} -\normalprotected\def\installctxfunction#1#2% expandable - {\edef\m_syst_name{\csstring#1}% - \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax - \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}} - -\normalprotected\def\installctxscanner#1#2% expandable - {\edef\m_syst_name{\csstring#1}% - \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax - \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}} - -\normalprotected\def\installprotectedctxfunction#1#2% protected - {\edef\m_syst_name{\csstring#1}% - \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax - \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}} - -\normalprotected\def\installprotectedctxscanner#1#2% protected - {\edef\m_syst_name{\csstring#1}% - \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax - \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}} - -% not yet used - -\ifdefined\luafunctioncall \else - \protected\def\luafunctioncall{\luafunctioncall} -\fi +\ifdefined\normalluadef + + \normalprotected\def\installctxfunction#1#2% expandable + {\edef\m_syst_name{\csstring#1}% + \global\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax} + + \normalprotected\def\installctxscanner#1#2% expandable + {\edef\m_syst_name{\csstring#1}% + \global\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax} + + \normalprotected\def\installprotectedctxfunction#1#2% protected + {\edef\m_syst_name{\csstring#1}% + \global\normalprotected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax} + + \normalprotected\def\installprotectedctxscanner#1#2% protected + {\edef\m_syst_name{\csstring#1}% + \global\normalprotected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax} + + \normalprotected\def\resetctxscanner#1% + {\edef\m_syst_name{\csstring#1}% + \expandafter\glet\csname\m_syst_name\endcsname\relax} + + % \let\installctxfunctioncall \installctxfunction + % \let\installctxscannercall \installctxscanner + % \let\installprotectedctxfunctioncall\installprotectedctxfunction + % \let\installprotectedctxscannercall \installprotectedctxscanner + +\else + + \ifdefined\luafunctioncall \else + \normalprotected\def\luafunctioncall{\luafunction} + \fi + + \normalprotected\def\installctxfunction#1#2% expandable + {\edef\m_syst_name{\csstring#1}% + \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax + \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}} + + \normalprotected\def\installctxscanner#1#2% expandable + {\edef\m_syst_name{\csstring#1}% + \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax + \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}} + + \normalprotected\def\installprotectedctxfunction#1#2% protected + {\edef\m_syst_name{\csstring#1}% + \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax + \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} + + \normalprotected\def\installprotectedctxscanner#1#2% protected + {\edef\m_syst_name{\csstring#1}% + \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax + \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} + + \normalprotected\def\resetctxscanner#1% + {\edef\m_syst_name{\csstring#1}% + \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\zerocount + \expandafter\glet\csname\m_syst_name\endcsname\relax} + + % \normalprotected\def\installctxfunctioncall#1#2% + % {\edef\m_syst_name{\csstring#1}% + % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax + % \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} + % + % \normalprotected\def\installctxscannercall#1#2% + % {\edef\m_syst_name{\csstring#1}% + % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax + % \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} + % + % \normalprotected\def\installprotectedctxfunctioncall#1#2% + % {\edef\m_syst_name{\csstring#1}% + % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax + % \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} + % + % \normalprotected\def\installprotectedctxscannercall#1#2% + % {\edef\m_syst_name{\csstring#1}% + % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax + % \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} -\normalprotected\def\installctxfunctioncall#1#2% - {\edef\m_syst_name{\csstring#1}% - \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax - \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} - -\normalprotected\def\installctxscannercall#1#2% - {\edef\m_syst_name{\csstring#1}% - \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax - \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} - -\normalprotected\def\installprotectedctxfunctioncall#1#2% - {\edef\m_syst_name{\csstring#1}% - \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax - \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} - -\normalprotected\def\installprotectedctxscannercall#1#2% - {\edef\m_syst_name{\csstring#1}% - \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax - \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}} - -\normalprotected\def\resetctxscanner#1% - {\edef\m_syst_name{\csstring#1}% - \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\zerocount - \global\expandafter\let\csname\m_syst_name\endcsname\relax} +\fi \protect \endinput |