diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lang-ini.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/lang-ini.lua | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/context/base/lang-ini.lua b/Master/texmf-dist/tex/context/base/lang-ini.lua index 525e0f17a12..97528097f15 100644 --- a/Master/texmf-dist/tex/context/base/lang-ini.lua +++ b/Master/texmf-dist/tex/context/base/lang-ini.lua @@ -20,9 +20,8 @@ local type, tonumber = type, tonumber local utf = unicode.utf8 local utfbyte = utf.byte local format, gsub = string.format, string.gsub -local concat = table.concat +local concat, sortedkeys, sortedpairs = table.concat, table.sortedkeys, table.sortedpairs local lpegmatch = lpeg.match -local texwrite = tex.write local settings_to_array = utilities.parsers.settings_to_array @@ -170,7 +169,7 @@ function languages.synonym(synonym,tag) -- convenience function end function languages.installed(separator) - context(concat(table.sortedkeys(registered),separator or ",")) + context(concat(sortedkeys(registered),separator or ",")) end function languages.current(n) @@ -219,7 +218,7 @@ if environment.initex then end function commands.languagenumber() - texwrite(0) + context(0) end else @@ -268,7 +267,7 @@ else languages.getnumber = getnumber function commands.languagenumber(tag,default,patterns) - texwrite(getnumber(tag,default,patterns)) + context(getnumber(tag,default,patterns)) end end @@ -320,10 +319,7 @@ languages.logger = languages.logger or { } function languages.logger.report() local result, r = { }, 0 - local sorted = table.sortedkeys(registered) - for i=1,#sorted do - local tag = sorted[i] - local l = registered[tag] + for tag, l in sortedpairs(registered) do if l.loaded then r = r + 1 result[r] = format("%s:%s:%s", tag, l.parent, l.number) |