summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtxlibs.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/context/lua/mtxlibs.lua')
-rw-r--r--scripts/context/lua/mtxlibs.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/context/lua/mtxlibs.lua b/scripts/context/lua/mtxlibs.lua
index 38c040b41..60889acde 100644
--- a/scripts/context/lua/mtxlibs.lua
+++ b/scripts/context/lua/mtxlibs.lua
@@ -49,16 +49,16 @@ if not modules then modules = { } end modules ['mtxlibs'] = {
-- the for context handy option to expose them in the normal ones. I might make the dependencies
-- less but it probably makes no sense to waste time on them.
-if not lpeg then require("lpeg") end
-if not md5 then xpcall(require,function() end,"md5") end
-if not lfs then xpcall(require,function() end,"lfs") end
-if not unicode then xpcall(require,function() end,"slunicode") end
+xpcall(function() local _, t = require("lpeg") return end,function() end) if t then lpeg = t end
+xpcall(function() local _, t = require("md5") return end,function() end) if t then md5 = t end
+xpcall(function() local _, t = require("lfs") return end,function() end) if t then lfs = t end
+xpcall(function() local _, t = require("slunicode") return end,function() end) if t then unicode = t end
-- begin library merge
-- end library merge
-local format, gsub, gmatch, match, find = string.format, string.gsub, string.gmatch, string.match, string.find
+local gsub, gmatch, match, find = string.gsub, string.gmatch, string.match, string.find
local concat = table.concat
local ownname = arg and arg[0] or 'mtxlibs.lua'