summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/syst-lua.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/syst-lua.mkiv')
-rw-r--r--tex/context/base/mkiv/syst-lua.mkiv45
1 files changed, 17 insertions, 28 deletions
diff --git a/tex/context/base/mkiv/syst-lua.mkiv b/tex/context/base/mkiv/syst-lua.mkiv
index a9905c7cc..3683f9ed8 100644
--- a/tex/context/base/mkiv/syst-lua.mkiv
+++ b/tex/context/base/mkiv/syst-lua.mkiv
@@ -24,31 +24,31 @@
%D {\expanded} primitive were mentioned in talks.} trip. For now I don't really see
%D other useful applications.
-\def\expandeddoif#1#2%
+\def\expandeddoifelse#1#2%
{\immediateassignment\edef\m_syst_string_one{#1}%
\immediateassignment\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two
- \expandafter\firstofoneargument
+ \expandafter\firstoftwoarguments
\else
- \expandafter\gobbleoneargument
+ \expandafter\secondoftwoarguments
\fi}
-\def\expandeddoifnot#1#2%
+\def\expandeddoif#1#2%
{\immediateassignment\edef\m_syst_string_one{#1}%
\immediateassignment\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two
- \expandafter\gobbleoneargument
- \else
\expandafter\firstofoneargument
+ \else
+ \expandafter\gobbleoneargument
\fi}
-\def\expandeddoifelse#1#2%
+\def\expandeddoifnot#1#2%
{\immediateassignment\edef\m_syst_string_one{#1}%
\immediateassignment\edef\m_syst_string_two{#2}%
\ifx\m_syst_string_one\m_syst_string_two
- \expandafter\firstoftwoarguments
+ \expandafter\gobbleoneargument
\else
- \expandafter\secondoftwoarguments
+ \expandafter\firstofoneargument
\fi}
% \testfeatureonce{100000}{\doifelse{hello world}{here i am}{}} % 0.3
@@ -60,35 +60,24 @@
\def\expdoifcommonelse\expdoifelsecommon
\def\expdoifinsetelse \expdoifelseinset
-% we define these here, just in case ...
+%D We define these here, just in case. This permits \typefile {self} otherwise
+%D nested b|/|e sep problems.
-\def\luastringsep{===} % this permits \typefile{self} otherwise nested b/e sep problems
+\def\luastringsep{===}
\edef\!!bs{[\luastringsep[}
\edef\!!es{]\luastringsep]}
\unexpanded\def\writestatus#1#2{\clf_writestatus{#1}{#2}}
-% A handy helper:
-
-% \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:
+%D We can omit the tex.ctxcatcodes here as nowadays we seldom change the regime at
+%D the \TEX\ end:
+%def\luaexpr#1{\ctxlua{context (tostring(#1))}} % more efficient:
\def\luaexpr#1{\ctxlua{tex.print(tostring(#1))}} % no use is shortcutting has to be compiled
-% helpers:
-
-\def\ui_fo #1{#1}
-\def\ui_go #1{}
-\def\ui_ft#1#2{#1}
-\def\ui_st#1#2{#2}
-
-
-%D But as we only use write 16 we could as well do all in \LUA\
-%D and ignore the rest. Okay, we still can do writes here but only
-%D when not blocked.
+%D But as we only use write 16 we could as well do all in \LUA\ and ignore the rest.
+%D Okay, we still can do writes here but only when not blocked.
\let\syst_write_execute\clf_execute % always {...}