summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/ltluatex.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltluatex.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/ltluatex.dtx27
1 files changed, 17 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltluatex.dtx b/Master/texmf-dist/source/latex/base/ltluatex.dtx
index 950b756133d..62d663c8d3f 100644
--- a/Master/texmf-dist/source/latex/base/ltluatex.dtx
+++ b/Master/texmf-dist/source/latex/base/ltluatex.dtx
@@ -24,7 +24,7 @@
\ProvidesFile{ltluatex.dtx}
%</driver>
%<*tex>
-[2015/10/02 v1.0e
+[2015/10/03 v1.0f
%</tex>
%<plain> LuaTeX support for plain TeX (core)
%<*tex>
@@ -351,7 +351,7 @@
%
% \endgroup
%
-% \CheckSum{488}
+% \CheckSum{491}
% \StopEventually{}
%
% \section{Implementation}
@@ -818,6 +818,14 @@ local modules = modules or { }
%
% \begin{macro}{provides_module}
% \changes{v1.0a}{2015/09/24}{Function added}
+% \changes{v1.0f}{2015/10/03}{use luatexbase\_log}
+% Local function to write to the log.
+% \begin{macrocode}
+local function luatexbase_log(text)
+ texio_write_nl("log", text)
+end
+% \begin{macrocode}
+%
% Modelled on |\ProvidesPackage|, we store much the same information but
% with a little more structure.
% \begin{macrocode}
@@ -829,8 +837,7 @@ local function provides_module(info)
local function spaced(text)
return text and (" " .. text) or ""
end
- texio_write_nl(
- "log",
+ luatexbase_log(
"Lua module: " .. info.name
.. spaced(info.date)
.. spaced(info.version)
@@ -1007,7 +1014,7 @@ local function new_attribute(name)
return -1
end
attributes[name]= tex_count["e@alloc@attribute@count"]
- texio_write_nl("Lua-only attribute " .. name .. " = " ..
+ luatexbase_log("Lua-only attribute " .. name .. " = " ..
tex_count["e@alloc@attribute@count"])
return tex_count["e@alloc@attribute@count"]
end
@@ -1027,7 +1034,7 @@ local function new_whatsit(name)
luatexbase_error("No room for a new custom whatsit")
return -1
end
- texio_write_nl("Custom whatsit " .. (name or "") .. " = " ..
+ luatexbase_log("Custom whatsit " .. (name or "") .. " = " ..
tex_count["e@alloc@whatsit@count"])
return tex_count["e@alloc@whatsit@count"]
end
@@ -1048,7 +1055,7 @@ local function new_bytecode(name)
luatexbase_error("No room for a new bytecode register")
return -1
end
- texio_write_nl("Lua bytecode " .. (name or "") .. " = " ..
+ luatexbase_log("Lua bytecode " .. (name or "") .. " = " ..
tex_count["e@alloc@bytecode@count"])
return tex_count["e@alloc@bytecode@count"]
end
@@ -1072,7 +1079,7 @@ local function new_chunkname(name)
return -1
end
lua.name[chunkname_count]=name
- texio_write_nl("Lua chunkname " .. (name or "") .. " = " ..
+ luatexbase_log("Lua chunkname " .. (name or "") .. " = " ..
chunkname_count .. "\n")
return chunkname_count
end
@@ -1412,7 +1419,7 @@ local function add_to_callback(name, func, description)
% \end{macrocode}
% Keep user informed.
% \begin{macrocode}
- texio_write_nl(
+ luatexbase_log(
"Inserting `" .. description .. "' at position "
.. priority .. " in `" .. name .. "'."
)
@@ -1466,7 +1473,7 @@ local function remove_from_callback(name, description)
end
cb = l[index]
table.remove(l, index)
- texio_write_nl(
+ luatexbase_log(
"Removing `" .. description .. "' from `" .. name .. "'."
)
if #l == 0 then