summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/base/ltluatex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/base/ltluatex.lua')
-rw-r--r--Master/texmf-dist/tex/latex/base/ltluatex.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/base/ltluatex.lua b/Master/texmf-dist/tex/latex/base/ltluatex.lua
index 1f88541c5f8..14922f0a540 100644
--- a/Master/texmf-dist/tex/latex/base/ltluatex.lua
+++ b/Master/texmf-dist/tex/latex/base/ltluatex.lua
@@ -226,6 +226,19 @@ local function new_chunkname(name)
return chunkname_count
end
luatexbase.new_chunkname = new_chunkname
+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)
+ if tex_count[luafunction_count_name] > 65534 then
+ luatexbase_error("No room for a new luafunction register")
+ end
+ luatexbase_log("Lua function " .. (name or "") .. " = " ..
+ tex_count[luafunction_count_name])
+ return tex_count[luafunction_count_name]
+end
+luatexbase.new_luafunction = new_luafunction
local callbacklist = callbacklist or { }
local list, data, exclusive, simple = 1, 2, 3, 4
local types = {
@@ -269,7 +282,7 @@ local callbacktypes = callbacktypes or {
build_page_insert = exclusive,
pre_linebreak_filter = list,
linebreak_filter = list,
- append_to_vlist_filter = list,
+ append_to_vlist_filter = exclusive,
post_linebreak_filter = list,
hpack_filter = list,
vpack_filter = list,