From f8e05edb088c3b5246e016f68df9c4cadccfd34d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sun, 15 May 2022 03:00:49 +0000
Subject: CTAN sync 202205150300

---
 .../lua-widow-control/lua-widow-control.tex        | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

(limited to 'macros/luatex/generic/lua-widow-control/lua-widow-control.tex')

diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.tex b/macros/luatex/generic/lua-widow-control/lua-widow-control.tex
index b667d05c11..78385ad698 100644
--- a/macros/luatex/generic/lua-widow-control/lua-widow-control.tex
+++ b/macros/luatex/generic/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 v2.0.6} %%version
+\wlog{lua-widow-control v2.1.0} %%version
 
 \ifx\directlua\undefined
     \errmessage{%
@@ -35,13 +35,8 @@
 \expandglyphsinfont\the\font 20 20 5
 \adjustspacing=2
 
-% Define \TeX{} wrappers for Lua functions
-\def\lwcenable{\directlua{lwc.enable_callbacks()}}
-\def\lwcdisable{\directlua{lwc.disable_callbacks()}}
-\def\iflwc{\directlua{lwc.if_lwc_enabled()}}
-
 % Enable \lwc/ by default when the package is loaded.
-\lwcenable
+\lwc@enable
 
 % Expansion of some parts of the document, such as section headings, is quite
 % undesirable, so we'll disable \lwc/ for certain commands.
@@ -50,15 +45,15 @@
 \newcount\lwc@disable@count
 
 \def\lwc@patch@pre{%
-    \iflwc%
+    \lwc@if@enabled%
         \advance\lwc@disable@count by 1%
-        \lwcdisable%
+        \lwc@disable%
     \fi%
 }
 
 \def\lwc@patch@post{
     \ifnum\lwc@disable@count>0%
-        \lwcenable%
+        \lwc@enable%
         \advance\lwc@disable@count by -1%
     \fi
 }
@@ -89,6 +84,13 @@
     \lwcdisablecmd{\beginsection} % Sectioning
 \endgroup
 
+% Make the commands public
+\let\lwcenable=\lwc@enable
+\let\lwcdisable=\lwc@disable
+\let\lwcdebug=\lwc@debug
+\let\iflwc=\lwc@if@enabled
+\let\lwcnobreak=\lwc@nobreak
+
 
 \catcode`@=12
 \endinput
-- 
cgit v1.2.3

