From ec45850390b27ff82a3ef2ab406a801393fdf603 Mon Sep 17 00:00:00 2001 From: Marius Date: Wed, 20 Mar 2013 11:40:14 +0200 Subject: beta 2013.03.20 10:34 --- scripts/context/lua/mtxlibs.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts') 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' -- cgit v1.2.3