[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Fix LuaLaTeX callback bug (01b2e581)

Marcel Fabian Krüger tex at 2krueger.de
Sat Sep 26 16:33:58 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/01b2e5812be9621347a35ce7ee1a65249f314c96

>---------------------------------------------------------------

commit 01b2e5812be9621347a35ce7ee1a65249f314c96
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sat Sep 26 16:33:58 2020 +0200

    Fix LuaLaTeX callback bug
    
    The previous code returned true if a list callback handler returned
    false after all previous handlers returned true.


>---------------------------------------------------------------

01b2e5812be9621347a35ce7ee1a65249f314c96
 base/changes.txt  | 5 +++++
 base/ltluatex.dtx | 7 ++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index ef9406cd..d658d807 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2020-09-25  Marcel Krüger  <Marcel.Krueger at latex-project.org>
+
+	* ltluatex.dtx:
+	Fix return value of list callbacks.
+
 2020-09-09  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltshipout.dtx (subsection{Emulating \pkg{atbegshi}}):
diff --git a/base/ltluatex.dtx b/base/ltluatex.dtx
index ec1031cc..8573b3e6 100644
--- a/base/ltluatex.dtx
+++ b/base/ltluatex.dtx
@@ -28,7 +28,7 @@
 \ProvidesFile{ltluatex.dtx}
 %</driver>
 %<*tex>
-[2020/08/10 v1.1r
+[2020/09/25 v1.1s
 %</tex>
 %<plain>  LuaTeX support for plain TeX (core)
 %<*tex>
@@ -1501,6 +1501,7 @@ end
 %    \end{macrocode}
 % Handler for |list| callbacks.
 % \changes{v1.0k}{2015/12/02}{resolve name and i.description (PHG)}
+% \changes{v1.1s}{2020/12/02}{Fix return value of list callbacks}
 %    \begin{macrocode}
 local function list_handler(name)
   return function(head, ...)
@@ -1513,7 +1514,7 @@ local function list_handler(name)
           "Function `" .. i.description .. "' returned false\n"
             .. "in callback `" .. name .."'"
          )
-         break
+        return false
       end
       if ret ~= true then
         alltrue = false
@@ -1546,7 +1547,7 @@ local function reverselist_handler(name)
           "Function `" .. cb.description .. "' returned false\n"
             .. "in callback `" .. name .."'"
          )
-         break
+        return false
       end
       if ret ~= true then
         alltrue = false





More information about the latex3-commits mailing list.