summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/luat-run.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-09-21 20:54:51 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-09-21 20:54:51 +0200
commit7c2efd42267783f01b64e0a47cba89f84742618c (patch)
tree4517e6bd3e024424dd82c5bb3c5e800cdff06fea /tex/context/base/mkiv/luat-run.lua
parent56ca0139232f16679918613ef45a5dd643f0f9b3 (diff)
downloadcontext-7c2efd42267783f01b64e0a47cba89f84742618c.tar.gz
2018-09-21 20:00:00
Diffstat (limited to 'tex/context/base/mkiv/luat-run.lua')
-rw-r--r--tex/context/base/mkiv/luat-run.lua23
1 files changed, 22 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/luat-run.lua b/tex/context/base/mkiv/luat-run.lua
index 3856575a9..4172201c2 100644
--- a/tex/context/base/mkiv/luat-run.lua
+++ b/tex/context/base/mkiv/luat-run.lua
@@ -115,6 +115,27 @@ local function wrapup_synctex()
synctex.wrapup()
end
+-- For Taco ...
+
+local sequencers = utilities.sequencers
+local appendgroup = sequencers.appendgroup
+local appendaction = sequencers.appendaction
+local wrapupactions = sequencers.new { }
+
+appendgroup(wrapupactions,"system")
+appendgroup(wrapupactions,"user")
+
+local function wrapup_run()
+ local runner = wrapupactions.runner
+ if runner then
+ runner()
+ end
+end
+
+function luatex.wrapup(action)
+ appendaction(wrapupactions,"user",action)
+end
+
-- this can be done later
callbacks.register('start_run', start_run, "actions performed at the beginning of a run")
@@ -135,7 +156,7 @@ callbacks.register('process_output_buffer', false, "actions perf
callbacks.register("pre_dump", pre_dump_actions, "lua related finalizers called before we dump the format") -- comes after \everydump
callbacks.register("finish_synctex", wrapup_synctex, "rename temporary synctex file")
-callbacks.register('wrapup_run', false, "actions performed after closing files")
+callbacks.register('wrapup_run', wrapup_run, "actions performed after closing files")
-- temp hack for testing: