summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/luat-cod.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/luat-cod.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/luat-cod.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/luat-cod.lua b/Master/texmf-dist/tex/context/base/luat-cod.lua
index ab21fef09c6..b022f31c3e9 100644
--- a/Master/texmf-dist/tex/context/base/luat-cod.lua
+++ b/Master/texmf-dist/tex/context/base/luat-cod.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['luat-cod'] = {
license = "see context related readme files"
}
-local match, gsub, find = string.match, string.gsub, string.find
+local match, gsub, find, format = string.match, string.gsub, string.find, string.format
local texconfig, lua = texconfig, lua
@@ -57,7 +57,7 @@ function lua.registerfinalizer(f,comment)
if type(f) == "function" then
finalizers[#finalizers+1] = { action = f, comment = comment }
else
- print(string.format("fatal error: invalid finalizer, action: %s",finalizer.comment or "unknown"))
+ print(format("fatal error: invalid finalizer, action: %s",finalizer.comment or "unknown"))
os.exit()
end
end
@@ -77,9 +77,10 @@ end
environment = environment or { }
local environment = environment
-local sourcefile = arg and arg[1] or ""
-local sourcepath = gsub (sourcefile,"^\"(.*)\"$", "%1")
-sourcepath = find(sourcepath,"/") and gsub(sourcepath,"/[^/]+$","") or ""
+-- no string.unquoted yet
+
+local sourcefile = gsub(arg and arg[1] or "","^\"(.*)\"$","%1")
+local sourcepath = find(sourcefile,"/") and gsub(sourcefile,"/[^/]+$","") or ""
local targetpath = "."
-- delayed (via metatable):