summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/luat-cod.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/luat-cod.lua')
-rw-r--r--tex/context/base/mkiv/luat-cod.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/luat-cod.lua b/tex/context/base/mkiv/luat-cod.lua
index 8d5d65a45..18126b186 100644
--- a/tex/context/base/mkiv/luat-cod.lua
+++ b/tex/context/base/mkiv/luat-cod.lua
@@ -59,9 +59,6 @@ local strip = false if arg then for i=-1,#arg do if arg[i] == "--c:strip" then s
function lua.registercode(filename,options)
local barename = gsub(filename,"%.[%a%d]+$","")
- if barename == filename then
- filename = filename .. ".lua"
- end
local basename = match(barename,"^.+[/\\](.-)$") or barename
if not bytedone[basename] then
local opts = { }
@@ -70,6 +67,9 @@ function lua.registercode(filename,options)
opts[s] = true
end
end
+ if barename == filename then
+ filename = filename .. (opts.autosuffix and CONTEXTLMTXMODE > 0 and ".lmt" or ".lua")
+ end
local code = environment.luafilechunk(filename,false,opts.optimize)
if code then
bytedone[basename] = true