From 9613f4348a811be2f2751873cd98072a9378c9d4 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Fri, 6 Sep 2013 18:45:04 +0200
Subject: adapt handling of default in settings

---
 lualibs.dtx | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

(limited to 'lualibs.dtx')

diff --git a/lualibs.dtx b/lualibs.dtx
index 6298564..45283cf 100644
--- a/lualibs.dtx
+++ b/lualibs.dtx
@@ -445,9 +445,23 @@ lualibs.module_info = {
 config           = config or { }
 config.lualibs   = config.lualibs or { }
 
-lualibs.prefer_merged   = config.lualibs.prefer_merged or true
-lualibs.load_extended   = config.lualibs.load_extended or true
-config.lualibs.verbose  = config.lualibs.verbose       or false
+if config.lualibs.prefer_merged ~= nil then
+  lualibs.prefer_merged = config.lualibs.prefer_merged
+else
+  lualibs.prefer_merged = true
+end
+
+if config.lualibs.load_extended ~= nil then
+  lualibs.load_extended = config.lualibs.load_extended
+else
+  lualibs.load_extended = true
+end
+
+if config.lualibs.verbose ~= nil then
+  config.lualibs.verbose = config.lualibs.verbose
+else
+  config.lualibs.verbose = false
+end
 
 %    \end{macrocode}
 %     The lualibs may be loaded in scripts.
-- 
cgit v1.2.3

