diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-09-16 23:18:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-09-16 23:18:00 +0200 |
commit | c60c6b0d5a3cefd662b44d08faecda1caf7e6cdc (patch) | |
tree | ed111299e91ff78e521004bda894a30809a54772 /scripts | |
parent | 6547dd194151a3ae9b7bc14a2c2e34933ee5f705 (diff) | |
download | context-c60c6b0d5a3cefd662b44d08faecda1caf7e6cdc.tar.gz |
beta 2012.09.16 23:18
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 13 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 13 | ||||
-rwxr-xr-x | scripts/context/stubs/unix/mtxrun | 13 |
3 files changed, 27 insertions, 12 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index ca9f2d348..dc8aa2615 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -5936,6 +5936,7 @@ function inspect(i) -- global function else print(tostring(i)) end + return i -- so that we can inline the inspect end -- from the lua book: @@ -8417,10 +8418,14 @@ function xml.load(filename,settings) elseif filename then -- filehandle data = filename:read("*all") end - settings.currentresource = filename - local result = xmlconvert(data,settings) - settings.currentresource = nil - return result + if settings then + settings.currentresource = filename + local result = xmlconvert(data,settings) + settings.currentresource = nil + return result + else + return xmlconvert(data,{ currentresource = filename }) + end end diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index ca9f2d348..dc8aa2615 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -5936,6 +5936,7 @@ function inspect(i) -- global function else print(tostring(i)) end + return i -- so that we can inline the inspect end -- from the lua book: @@ -8417,10 +8418,14 @@ function xml.load(filename,settings) elseif filename then -- filehandle data = filename:read("*all") end - settings.currentresource = filename - local result = xmlconvert(data,settings) - settings.currentresource = nil - return result + if settings then + settings.currentresource = filename + local result = xmlconvert(data,settings) + settings.currentresource = nil + return result + else + return xmlconvert(data,{ currentresource = filename }) + end end diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index ca9f2d348..dc8aa2615 100755 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -5936,6 +5936,7 @@ function inspect(i) -- global function else print(tostring(i)) end + return i -- so that we can inline the inspect end -- from the lua book: @@ -8417,10 +8418,14 @@ function xml.load(filename,settings) elseif filename then -- filehandle data = filename:read("*all") end - settings.currentresource = filename - local result = xmlconvert(data,settings) - settings.currentresource = nil - return result + if settings then + settings.currentresource = filename + local result = xmlconvert(data,settings) + settings.currentresource = nil + return result + else + return xmlconvert(data,{ currentresource = filename }) + end end |