Attempt better maxdeadcycles handling
This commit is contained in:
parent
8494bde0a5
commit
fc21983b16
@ -124,8 +124,9 @@ local do_terminal_input do
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
local errorvalues = tex.geterrorvalues()
|
||||
function callbacks.intercept_tex_error(mode, errortype)
|
||||
local function intercept(mode, errortype)
|
||||
errortype = errorvalues[errortype]
|
||||
if errortype == "eof" then
|
||||
-- print('EOF', token.peek_next())
|
||||
@ -169,4 +170,14 @@ function callbacks.intercept_tex_error(mode, errortype)
|
||||
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