summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex-dev/base/ltluatex.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex-dev/base/ltluatex.dtx')
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltluatex.dtx12
1 files changed, 9 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/ltluatex.dtx b/Master/texmf-dist/source/latex-dev/base/ltluatex.dtx
index 135cb630096..6d274ed5c33 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltluatex.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltluatex.dtx
@@ -28,7 +28,7 @@
\ProvidesFile{ltluatex.dtx}
%</driver>
%<*tex>
-[2023/01/19 v1.2b
+[2023/08/03 v1.2c
%</tex>
%<plain> LuaTeX support for plain TeX (core)
%<*tex>
@@ -1284,6 +1284,7 @@ luatexbase.new_chunkname = new_chunkname
%
% \begin{macro}{new_luafunction}
% \changes{v1.1i}{2018/10/21}{Function added}
+% \changes{v1.2c}{2023/07/02}{Ensure existing table entries not overwritten gh/1100}
% Much the same as for attribute allocation in Lua.
% The optional \meta{name} argument is used in the log if given.
% \begin{macrocode}
@@ -1291,7 +1292,11 @@ local luafunction_count_name =
luafunction_count_name or "e@alloc@luafunction@count"
local function new_luafunction(name)
tex_setcount("global", luafunction_count_name,
- tex_count[luafunction_count_name] + 1)
+ math.max(
+ #(lua.get_functions_table()),
+ tex_count[luafunction_count_name])
+ + 1)
+ lua.get_functions_table()[tex_count[luafunction_count_name]] = false
if tex_count[luafunction_count_name] > 65534 then
luatexbase_error("No room for a new luafunction register")
end
@@ -2147,12 +2152,13 @@ luatexbase.uninstall = uninstall
% \begin{macro}{mlist_to_hlist}
% \changes{v1.1l}{2020/02/02}{|pre/post_mlist_to_hlist| added}
% \changes{v1.1y}{2022/08/13}{Use shared\_callback system for pre/post/mlist_to_hlist}
+% \changes{v1.2c}{2023/08/03}{Fix callback type of post_mlist_to_hlist_callback}
% To emulate these callbacks, the ``real'' |mlist_to_hlist| is replaced by a
% wrapper calling the wrappers before and after.
% \begin{macrocode}
create_callback('pre_mlist_to_hlist_filter', 'list')
create_callback('mlist_to_hlist', 'exclusive', node.mlist_to_hlist)
-create_callback('post_mlist_to_hlist_filter', 'list')
+create_callback('post_mlist_to_hlist_filter', 'reverselist')
function shared_callbacks.mlist_to_hlist.handler(head, display_type, need_penalties)
local current = call_callback("pre_mlist_to_hlist_filter", head, display_type, need_penalties)
if current == false then