Attempt better maxdeadcycles handling
This commit is contained in:
parent
8494bde0a5
commit
fc21983b16
@ -124,8 +124,9 @@ local do_terminal_input do
|
||||
end
|
||||
end
|
||||
|
||||
local errorvalues = tex.geterrorvalues()
|
||||
function callbacks.intercept_tex_error(mode, errortype)
|
||||
do
|
||||
local errorvalues = tex.geterrorvalues()
|
||||
local function intercept(mode, errortype)
|
||||
errortype = errorvalues[errortype]
|
||||
if errortype == "eof" then
|
||||
-- print('EOF', token.peek_next())
|
||||
@ -168,5 +169,15 @@ function callbacks.intercept_tex_error(mode, errortype)
|
||||
end
|
||||
until false
|
||||
return 3
|
||||
end
|
||||
function callbacks.intercept_tex_error(mode, errortype)
|
||||
local ret = intercept(mode, errortype)
|
||||
if tex.deadcycles >= tex.maxdeadcycles then
|
||||
tex.runtoks(function()
|
||||
tex.sprint(1, '\\shipout\\box255')
|
||||
end)
|
||||
end
|
||||
return ret
|
||||
end
|
||||
end
|
||||
callbacks.__freeze'intercept_tex_error'
|
||||
|
Loading…
Reference in New Issue
Block a user