summaryrefslogtreecommitdiff
path: root/tex/context/base/util-mrg.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-02-13 18:06:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-02-13 18:06:00 +0100
commite85a18b025a884ca31f94408fa5e9d78f8cfd31d (patch)
treec997b733faff3c37545d7998bccacc0cd87c89a7 /tex/context/base/util-mrg.lua
parent82bdeb2e18e5047f65bb122aa1b6bdcceb1abb92 (diff)
downloadcontext-e85a18b025a884ca31f94408fa5e9d78f8cfd31d.tar.gz
beta 2013.02.13 18:06
Diffstat (limited to 'tex/context/base/util-mrg.lua')
-rw-r--r--tex/context/base/util-mrg.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/tex/context/base/util-mrg.lua b/tex/context/base/util-mrg.lua
index 276531d79..f8742151c 100644
--- a/tex/context/base/util-mrg.lua
+++ b/tex/context/base/util-mrg.lua
@@ -51,6 +51,8 @@ local m_report = [[
-- stripped bytes : %s
]]
+local m_preloaded = [[package.loaded[%q] = package.loaded[%q] or true]]
+
local function self_fake()
return m_faked
end
@@ -175,11 +177,13 @@ local function self_libs(libs,list)
local fullname = foundpath .. "/" .. lib
if lfs.isfile(fullname) then
utilities.report("merge: using library %s",fullname)
+ local preloaded = file.nameonly(lib)
local data = io.loaddata(fullname,true)
original = original + #data
local data, delta = self_compact(data)
right[#right+1] = lib
result[#result+1] = m_begin_closure
+ result[#result+1] = format(m_preloaded,preloaded,preloaded)
result[#result+1] = data
result[#result+1] = m_end_closure
stripped = stripped + delta