summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-03-20 11:40:14 +0200
committerMarius <mariausol@gmail.com>2013-03-20 11:40:14 +0200
commitec45850390b27ff82a3ef2ab406a801393fdf603 (patch)
treeaf86d8f869ebd338a9b9d6dccc8cffd6c67d3ee7 /scripts
parentc1dea81cbfff1644796ad5b4e00965250529b5b4 (diff)
downloadcontext-ec45850390b27ff82a3ef2ab406a801393fdf603.tar.gz
beta 2013.03.20 10:34
Diffstat (limited to 'scripts')
-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'