summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/syst-lua.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-lua.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/syst-lua.mkiv20
1 files changed, 15 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-lua.mkiv b/Master/texmf-dist/tex/context/base/syst-lua.mkiv
index 0d72e4a019b..88a8c246e26 100644
--- a/Master/texmf-dist/tex/context/base/syst-lua.mkiv
+++ b/Master/texmf-dist/tex/context/base/syst-lua.mkiv
@@ -19,7 +19,7 @@
\def\expdoif #1#2{\ctxcommand{doif (\!!bs#1\!!es==\!!bs#2\!!es)}}
\def\expdoifnot #1#2{\ctxcommand{doifnot (\!!bs#1\!!es==\!!bs#2\!!es)}}
-% \testfeatureonce{100000}{\doifelse{hello world}{here i am}{}} % 0.3
+% \testfeatureonce{100000}{\doifelse{hello world}{here i am}{}} % 0.3
% \testfeatureonce{100000}{\expandabledoifelse{hello world}{here i am}{}} % 1.5
\def\expdoifcommonelse#1#2{\ctxcommand{doifcommonelse("#1","#2")}}
@@ -34,10 +34,20 @@
\unexpanded\def\writestatus#1#2{\ctxcommand{writestatus(\!!bs#1\!!es,\!!bs#2\!!es)}}
-% a handy helper (we can probably omit the tex.ctxcatcodes here as nowadays we seldom
-% change the regime at the tex end
+% A handy helper:
-%def\luaexpr#1{\ctxlua {context(tostring(#1))}}
-\def\luaexpr#1{\directlua\zerocount{context(tostring(#1))}} % wrap in global function ?
+% \def\luaexpr#1{\ctxlua{context(tostring(#1))}} % more efficient:
+
+% We can omit the tex.ctxcatcodes here as nowadays we seldom
+% change the regime at the \TEX\ end:
+
+\def\luaexpr#1{\directlua{tex.print(tostring(#1))}}
+
+% helpers:
+
+\def\ui_fo #1{#1}
+\def\ui_go #1{}
+\def\ui_ft#1#2{#1}
+\def\ui_st#1#2{#2}
\protect \endinput