diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
commit | 5c6357cdb820b4f628d036ba7b2248f221d50c0b (patch) | |
tree | 6365552f2737faaffe63a395272da242ee2c4f03 /Master/texmf-dist/tex/context/base/mkiv/cont-run.lua | |
parent | b4568bc71e054f3d1fd6404b45d2322631778284 (diff) |
ConTeXt version 2019.02.22 19:35
git-svn-id: svn://tug.org/texlive/trunk@50086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/cont-run.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/cont-run.lua | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua b/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua index 9bd252e6098..2634654fe77 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/cont-run.lua @@ -142,6 +142,7 @@ trackers.register("sandbox.tracecalls",sandbox.logcalls) trackers.register("sandbox.tracefiles",sandbox.logfiles) local sandboxing = environment.arguments.sandbox +local debugging = environment.arguments.debug if sandboxing then @@ -170,15 +171,33 @@ if sandboxing then \let\normalprimitive\relax ]] -end + debug = { + traceback = traceback, + } -local function processjob() + package.loaded.debug = debug - environment.initializefilenames() -- todo: check if we really need to pre-prep the filename +elseif debugging then + + -- we keep debug + +else + + debug = { + traceback = traceback, + getinfo = getinfo, + sethook = sethook, + } + + package.loaded.debug = debug + +end + +local preparejob preparejob = function() -- tricky: we need a hook for this local arguments = environment.arguments - local suffix = environment.suffix - local filename = environment.filename -- hm, not inputfilename ! + + environment.lmtxmode = CONTEXTLMTXMODE if arguments.nosynctex then luatex.synctex.setup { @@ -222,6 +241,24 @@ local function processjob() -- directives.enable("logs.errors",arguments.errors) -- end + preparejob = function() end + + job.prepare = preparejob + +end + +job.prepare = preparejob + +local function processjob() + + environment.initializefilenames() -- todo: check if we really need to pre-prep the filename + + local arguments = environment.arguments + local suffix = environment.suffix + local filename = environment.filename -- hm, not inputfilename ! + + preparejob() + if not filename or filename == "" then -- skip elseif suffix == "xml" or arguments.forcexml then @@ -285,7 +322,6 @@ local function processjob() -- \writestatus{system}{processing as tex} -- We have a regular tex file so no \starttext yet as we can -- load fonts. - -- context.enabletrackers { "resolvers.*" } context.input(filename) -- context.disabletrackers { "resolvers.*" } |