Let command line interaction mode overwrite format value

This commit is contained in:
Marcel Fabian Krüger 2021-11-09 16:55:28 +01:00
parent 15fdafd353
commit 41b40c07b0

View File

@ -24,19 +24,6 @@ do
end end
end end
kpse.set_program_name(arg.arg0 or arg[arg[0]], arg.progname) kpse.set_program_name(arg.arg0 or arg[arg[0]], arg.progname)
do
local interaction = ({ [true] = 3, [false] = false,
batchmode=0,
nonstopmode=1,
scrollmode=2,
errorstopmode=3,
})[arg.interaction or false]
if interaction then
tex.setinteraction(interaction)
elseif interaction == nil then
texio.write('term', string.format('Unknown interaction mode %q ignored.\n', arg.interaction))
end
end
package.searchers[2] = function(modname) package.searchers[2] = function(modname)
local filename = kpse.find_file(modname, "lua", true) local filename = kpse.find_file(modname, "lua", true)
if not filename then if not filename then
@ -72,6 +59,19 @@ end
callback_register('find_format_file', function(name) texconfig.formatname = kpse.find_file(name, 'fmt', true) return texconfig.formatname end) callback_register('find_format_file', function(name) texconfig.formatname = kpse.find_file(name, 'fmt', true) return texconfig.formatname end)
-- texconfig.firstline = [[\show ]] -- texconfig.firstline = [[\show ]]
function texconfig.init() function texconfig.init()
do
local interaction = ({ [true] = 3, [false] = false,
batchmode=0,
nonstopmode=1,
scrollmode=2,
errorstopmode=3,
})[arg.interaction or false]
if interaction then
tex.setinteraction(interaction)
elseif interaction == nil then
texio.write('term', string.format('Unknown interaction mode %q ignored.\n', arg.interaction))
end
end
if build_bytecode then -- Effectivly if status.ini_version if build_bytecode then -- Effectivly if status.ini_version
require'luametalatex-lateinit'(build_bytecode) require'luametalatex-lateinit'(build_bytecode)
else else