summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/luat-env.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-07-31 18:26:52 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-07-31 18:26:52 +0200
commit1873d112b56f49e40ece29916ede51933412bca8 (patch)
tree1ad98a73dfbf2f1a98703f31e0df9e0cdf4f260c /tex/context/base/mkiv/luat-env.lua
parent47852e5715e7c0374bb6bc173c1728908549e1ed (diff)
downloadcontext-1873d112b56f49e40ece29916ede51933412bca8.tar.gz
2019-07-31 18:13:00
Diffstat (limited to 'tex/context/base/mkiv/luat-env.lua')
-rw-r--r--tex/context/base/mkiv/luat-env.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/luat-env.lua b/tex/context/base/mkiv/luat-env.lua
index e0c69d207..e6a0c8c5d 100644
--- a/tex/context/base/mkiv/luat-env.lua
+++ b/tex/context/base/mkiv/luat-env.lua
@@ -71,6 +71,17 @@ function environment.texfile(filename)
end
function environment.luafile(filename) -- needs checking
+
+ if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 and file.suffix(filename) == "lua" then
+ -- no "tex", as that's pretty slow when not found (suffixes get appended, shouldn't happen)
+ -- trackers.enable("resolvers.*")
+ local resolved = resolvers.findfile(file.replacesuffix(filename,"lmt")) or ""
+ -- trackers.disable("resolvers.*")
+ if resolved ~= "" then
+ return resolved
+ end
+ end
+
local resolved = resolvers.findfile(filename,'tex') or ""
if resolved ~= "" then
return resolved