summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-04-13 18:56:37 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-04-13 18:56:37 +0200
commit7cead7f43cd14b36b30c42544ef1a458df8fdf5a (patch)
tree47f6425f1f5e60fa076e138c9d699a5f0b51da11
parent70b8030f6092bd3913444b6da97887c35f182de2 (diff)
downloadlualibs-7cead7f43cd14b36b30c42544ef1a458df8fdf5a.tar.gz
configuration by global
-rw-r--r--lualibs.lua15
1 files changed, 13 insertions, 2 deletions
diff --git a/lualibs.lua b/lualibs.lua
index 13fefff..ec02a5a 100644
--- a/lualibs.lua
+++ b/lualibs.lua
@@ -11,7 +11,16 @@ local lualibs_module = {
license = "See ConTeXt's mreadme.pdf for the license",
}
-local prefer_merged = true -- | false --- TODO should be set in some global config
+--- TODO should be set in some global config
+local prefer_merged = true ---false
+local load_extended = true ---false
+
+if config and config.lualibs then
+ local cl_prefer_merged = config.lualibs.prefer_merged
+ local cl_load_extended = config.lualibs.load_extended
+ if cl_prefer_merged ~= nil then prefer_merged = cl_prefer_merged end
+ if cl_load_extended ~= nil then load_extended = cl_load_extended end
+end
local lpeg, kpse = lpeg, kpse
@@ -78,7 +87,9 @@ the split into luat-bas.mkiv and luat-lib.mkiv.
loadmerged"basic.lua"
--inspect(table.keys(table))
--inspect(table.keys(string))
-loadmerged"extended.lua"
+if load_extended then
+ loadmerged"extended.lua"
+end
-- vim:tw=71:sw=2:ts=2:expandtab
-- End of File `lualibs-basic.lua'.