summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/util-soc-imp-mime.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-08-24 19:49:58 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-08-24 19:49:58 +0200
commit994bed45a8c8f6833acbdb9250eb4ad531717111 (patch)
tree85694804db8fdd4b0ed3d9c0c92e87740b7af3d4 /tex/context/base/mkiv/util-soc-imp-mime.lua
parent990e593fc4ae1da7568f52ba2c61539ba4e79069 (diff)
downloadcontext-994bed45a8c8f6833acbdb9250eb4ad531717111.tar.gz
2018-08-24 19:26:00
Diffstat (limited to 'tex/context/base/mkiv/util-soc-imp-mime.lua')
-rw-r--r--tex/context/base/mkiv/util-soc-imp-mime.lua13
1 files changed, 6 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/util-soc-imp-mime.lua b/tex/context/base/mkiv/util-soc-imp-mime.lua
index b1a5827ac..aea205728 100644
--- a/tex/context/base/mkiv/util-soc-imp-mime.lua
+++ b/tex/context/base/mkiv/util-soc-imp-mime.lua
@@ -8,8 +8,11 @@ local ltn12 = ltn12 or require("ltn12")
local filtercycle = ltn12.filter.cycle
-local report = logs and logs.reporter("mime") or function(fmt,first,...)
- if fmt then
+local function report(fmt,first,...)
+ if logs then
+ report = logs and logs.reporter("mime")
+ report(fmt,first,...)
+ elseif fmt then
fmt = "mime: " .. fmt
if first then
print(format(fmt,first,...))
@@ -96,10 +99,6 @@ mime.encode = choose(encodet)
mime.decode = choose(decodet)
mime.wrap = choose(wrapt)
-if logs then
- _G.mime = mime
- package.loaded.mime = mime
- -- report("module (re)installed")
-end
+package.loaded.mime = mime
return mime