summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/cldf-bas.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-08-16 10:45:39 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-08-16 10:45:39 +0200
commit0fcb576f359edfdd50c2b13615a03b966a9073df (patch)
tree5dcac6c5002e1552c1770facfbd27611fe54ba0f /tex/context/base/mkiv/cldf-bas.lua
parentd6850b00fa0f937514389e8d090db87b0163a703 (diff)
downloadcontext-0fcb576f359edfdd50c2b13615a03b966a9073df.tar.gz
2018-08-16 10:24:00
Diffstat (limited to 'tex/context/base/mkiv/cldf-bas.lua')
-rw-r--r--tex/context/base/mkiv/cldf-bas.lua40
1 files changed, 35 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/cldf-bas.lua b/tex/context/base/mkiv/cldf-bas.lua
index 0f9ef4e47..af698ac97 100644
--- a/tex/context/base/mkiv/cldf-bas.lua
+++ b/tex/context/base/mkiv/cldf-bas.lua
@@ -176,16 +176,46 @@ context.registers = {
newchar = function(name,u) context([[\chardef\%s=%s\relax]],name,u) end,
}
-if LUATEXFUNCTIONALITY > 6780 then
+do
+
+ local ctx_flushnode = context.nodes.flush
function context.latelua(f)
- sprint(new_latelua(f)) -- maybe just context
+ ctx_flushnode(new_latelua(f))
end
-else
+end
+-- yes or no
+
+do
+
+ local NC = ctxcore.NC
+ local BC = ctxcore.BC
+ local NR = ctxcore.NR
+
+ context.nc = setmetatable({ }, {
+ __call =
+ function(t,...)
+ NC()
+ return context(...)
+ end,
+ __index =
+ function(t,k)
+ NC()
+ return context[k]
+ end,
+ }
+ )
+
+ function context.bc(...)
+ BC()
+ return context(...)
+ end
- function context.latelua(f)
- context(new_latelua(f))
+ function context.nr(...)
+ NC()
+ NR()
end
end
+