summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-03-20 10:34:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-03-20 10:34:00 +0100
commit6b84787f837527fa9eb67bd3d343686dd7c41ba6 (patch)
treecd23c881eca0d0f3472de2a4b4cb33ec738a6f9d /scripts
parentde0507377f78f5c05fcece1ec7dc53bacdc0247c (diff)
downloadcontext-6b84787f837527fa9eb67bd3d343686dd7c41ba6.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'