summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/luat-cod.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-07-14 00:25:53 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-07-14 00:25:53 +0200
commitf1129626606384a7a55a21a83531f51f8b5dee25 (patch)
tree9bfaf9a8bf2c218007291023f771babc9ac2e1d9 /tex/context/base/mkiv/luat-cod.lua
parentb821116421f0d942052ad225f4ea62aef2696817 (diff)
downloadcontext-f1129626606384a7a55a21a83531f51f8b5dee25.tar.gz
2020-07-13 23:52:00
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