diff options
author | Karl Berry <karl@freefriends.org> | 2024-03-11 20:00:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-03-11 20:00:23 +0000 |
commit | c4b89199049cacebf8eae5db7d2cd03a5a1bdd23 (patch) | |
tree | 23490cb7ef739e1fafe711c4ad9fc334c1e1d124 /Master/texmf-dist/tex/luatex | |
parent | 52d7a2f426653fc153c3935a8626d7f108bceb46 (diff) |
lua-widow-control (11mar24)
git-svn-id: svn://tug.org/texlive/trunk@70601 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r-- | Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua | 26 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex | 2 |
2 files changed, 19 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua index 59ae84ee3e2..cb23cb5235b 100644 --- a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua +++ b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua @@ -21,7 +21,6 @@ lwc = lwc or {} lwc.name = "lua-widow-control" -- Locals for `debug_print` -local debug_lib = debug local string_rep = string.rep local write_nl = texio.write_nl @@ -228,8 +227,8 @@ elseif plain or latex or optex then debug("Plain/LaTeX") luatexbase.provides_module { name = lwc.name, - date = "2022/11/22", --%%slashdate - version = "3.0.0", --%%version + date = "2024/03/11", --%%slashdate + version = "3.0.1", --%%version description = [[ This module provides a LuaTeX-based solution to prevent @@ -1723,15 +1722,26 @@ register_tex_cmd( --- callback and disable it so that no warning is generated. --- --- However, each time that we enable/disable the null `hpack_quality` callback, ---- luatexbase puts an info message in the log. This completely fills the log file ---- with useless error messages, so we disable it here. +--- luatexbase puts an info message in the log. This completely fills the log +--- file with useless error messages, so we disable it here. --- ---- This uses the Lua `debug` library to internally modify the log upvalue in the ---- `add_to_callback` function. This is almost certainly a terrible idea, but I ---- don't know of a better way to do it. +--- This uses the Lua `debug` library to internally modify the log upvalue in +--- the `add_to_callback` function. This is almost certainly a terrible idea, +--- but I don't know of a better way to do it. --- --- @return nil local function silence_luatexbase() + local debug_lib = require("debug") + + -- On TL24, the `debug` library no longer exists, so there's nothing that + -- we can do here. + if not debug_lib or + not debug_lib.getinfo or + not debug_lib.getupvalue or + not debug_lib.setupvalue then + return + end + local nups = debug_lib.getinfo(luatexbase.add_to_callback).nups for i = 1, nups do diff --git a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex index e25342ee4b0..e98f1f7ae66 100644 --- a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex +++ b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex @@ -3,7 +3,7 @@ % SPDX-License-Identifier: MPL-2.0+ % SPDX-FileCopyrightText: 2022 Max Chernoff -\wlog{lua-widow-control v3.0.0} %%version +\wlog{lua-widow-control v3.0.1} %%version \ifx\directlua\undefined \errmessage{% |