diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-07-04 13:50:48 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-07-04 13:50:48 +0200 |
commit | 4bc28891615011ed3581836e9259434720e25830 (patch) | |
tree | 4a753013e7b1e5b83a76c2708939d40b13972240 /tex/context/base/mkiv/cldf-ini.lua | |
parent | 739710f590371de17ae0debb4dc38b0de270b9f3 (diff) | |
download | context-4bc28891615011ed3581836e9259434720e25830.tar.gz |
2019-07-04 12:36:00
Diffstat (limited to 'tex/context/base/mkiv/cldf-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/cldf-ini.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/cldf-ini.lua b/tex/context/base/mkiv/cldf-ini.lua index 0778ced4e..ff4f5e3b1 100644 --- a/tex/context/base/mkiv/cldf-ini.lua +++ b/tex/context/base/mkiv/cldf-ini.lua @@ -326,6 +326,39 @@ end setmetatablecall(knownfunctions,function(t,n) return knownfunctions[n](n) end) +-- some protection + +do + + local stub = { } + local done = false + local message = function() + -- one time message + if not done then + report_cld("") + report_cld("use : slot = context.functions.register(f)") + report_cld("and : context.functions.unregister(slot)") + report_cld("") + done = true + end + end + + setmetatable(stub, { + __index = message, + __newindex = message, + }) + + function lua.getfunctionstable() + message() + return stub + end + + lua.get_functions_table = lua.getfunctionstable + +end + +-- so far + -- The next hack is a convenient way to define scanners at the Lua end and -- get them available at the TeX end. There is some dirty magic needed to -- prevent overload during format loading. |