summaryrefslogtreecommitdiff
path: root/tex/context/base/cldf-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/cldf-ini.lua')
-rw-r--r--tex/context/base/cldf-ini.lua20
1 files changed, 19 insertions, 1 deletions
diff --git a/tex/context/base/cldf-ini.lua b/tex/context/base/cldf-ini.lua
index b045282b1..c943dcb51 100644
--- a/tex/context/base/cldf-ini.lua
+++ b/tex/context/base/cldf-ini.lua
@@ -609,7 +609,7 @@ function context.fprint(catcodes,fmt,first,...)
end
else
if fmt then
- flush(format(catodes,fmt,first,...))
+ flush(format(catcodes,fmt,first,...))
else
flush(catcodes)
end
@@ -624,6 +624,24 @@ function tex.fprint(fmt,first,...) -- goodie
end
end
+local formatters = string.formatters
+
+function context.formatted(catcodes,fmt,first,...)
+ if type(catcodes) == "number" then
+ if first then
+ flush(catcodes,formatters[fmt](first,...))
+ else
+ flush(catcodes,fmt)
+ end
+ else
+ if fmt then
+ flush(formatters[catcodes](fmt,first,...))
+ else
+ flush(catcodes)
+ end
+ end
+end
+
-- logging
local trace_stack = { }