From 41b40c07b01ddbac7186b8cfc99b1e3c3e811bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Tue, 9 Nov 2021 16:55:28 +0100 Subject: [PATCH] Let command line interaction mode overwrite format value --- luametalatex-init.lua | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/luametalatex-init.lua b/luametalatex-init.lua index b16066a..ff8060e 100644 --- a/luametalatex-init.lua +++ b/luametalatex-init.lua @@ -24,19 +24,6 @@ do end end 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) local filename = kpse.find_file(modname, "lua", true) 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) -- texconfig.firstline = [[\show ]] 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 require'luametalatex-lateinit'(build_bytecode) else