diff options
Diffstat (limited to 'tex/context/base/buff-ini.mkiv')
-rw-r--r-- | tex/context/base/buff-ini.mkiv | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tex/context/base/buff-ini.mkiv b/tex/context/base/buff-ini.mkiv index 86b0fa3c5..13f69554f 100644 --- a/tex/context/base/buff-ini.mkiv +++ b/tex/context/base/buff-ini.mkiv @@ -15,6 +15,10 @@ \registerctxluafile{buff-ini}{1.001} +% todo: move all to lua, also before and after, just context.beforebuffer() +% todo: commalist to lua end +% todo: jobname == "" so no need for testing + % todo: % % \startluacode @@ -352,4 +356,23 @@ \def\dosavebuffer[#1][#2]{\ctxlua{commands.savebuffer("#1","#2")}} +%D Experimental: no expansion of commands in buffer! + +% \startbuffer[what] +% tex.print("WHAT") +% \stopbuffer +% \startbuffer +% tex.print("JOBNAME") +% \stopbuffer +% +% \ctxluabuffer[what] \ctxluabuffer + +\def\ctxluabuffer + {\dosingleempty\doctxluabuffer} + +\def\doctxluabuffer[#1]% + {\doifelsenothing{#1} + {\ctxlua{buffers.evaluate("\jobname")}} + {\ctxlua{buffers.evaluate("#1")}}} + \protect \endinput |