summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mtx-context-listing.tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-01-14 17:29:49 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-01-14 17:29:49 +0100
commita16cd078a5cc00d7c789093b5209b6f8d2dfdb1a (patch)
tree3385cd79be0c9b3b66ed3c465b03eefc92001b21 /tex/context/base/mkiv/mtx-context-listing.tex
parent52c5102fab837626fe9bb359b3eda6066e1a968e (diff)
downloadcontext-a16cd078a5cc00d7c789093b5209b6f8d2dfdb1a.tar.gz
2018-01-14 16:05:00
Diffstat (limited to 'tex/context/base/mkiv/mtx-context-listing.tex')
-rw-r--r--tex/context/base/mkiv/mtx-context-listing.tex16
1 files changed, 11 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/mtx-context-listing.tex b/tex/context/base/mkiv/mtx-context-listing.tex
index 41e468e1f..f7c3d2868 100644
--- a/tex/context/base/mkiv/mtx-context-listing.tex
+++ b/tex/context/base/mkiv/mtx-context-listing.tex
@@ -97,12 +97,15 @@
context.usemodule { "scite" }
end
- if #document.files > 0 then
+ local done = false
+ local files = document.files
+
+ if #files > 0 then
if document.arguments.sort then
- table.sort(document.files)
+ table.sort(files)
end
- for i=1,#document.files do
- local filename = document.files[i]
+ for i=1,#files do
+ local filename = files[i]
if not string.find(filename,"^mtx%-context%-") then
local pretty = document.arguments.pretty
if pretty == true then
@@ -129,9 +132,12 @@
else
context.typefile(filename)
end
+ done = true
end
end
- else
+ end
+
+ if not done then
context("no files given")
end