[latex3-commits] [latex3/latex3] main: Add existence test to l3prop functions as a temporary fix (b4c969ce3)

github at latex-project.org github at latex-project.org
Sat Feb 17 14:05:07 CET 2024


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/b4c969ce3a1cbf86fb88e7b8d5ff904ea7bc07cd

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

commit b4c969ce3a1cbf86fb88e7b8d5ff904ea7bc07cd
Author: Bruno Le Floch <blflatex at gmail.com>
Date:   Sat Feb 17 14:05:07 2024 +0100

    Add existence test to l3prop functions as a temporary fix
    
    This is meant as a temporary measure to avoid breaking packages.
    I'm not totally sure if it covers the right set of functions.
    More testing welcome.  I think this should be reverted in a
    couple of weeks after the freeze.


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

b4c969ce3a1cbf86fb88e7b8d5ff904ea7bc07cd
 l3kernel/l3prop.dtx | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/l3kernel/l3prop.dtx b/l3kernel/l3prop.dtx
index 828161192..823c273c8 100644
--- a/l3kernel/l3prop.dtx
+++ b/l3kernel/l3prop.dtx
@@ -1014,9 +1014,18 @@
 %   make the second choice; this way props that are accidentally
 %   \tn{relax} are treated as they were before.  The auxiliary receives
 %   \cs{use_i:nn} or \cs{use_ii:nn} as~|#3|.
+%   The existence test (and its arguments) are just there to temporarily
+%   avoid breaking some packages before the TeXlive freeze, and should
+%   be removed in later revisions.  We use a global assignment like in
+%   \cs{prop_new:N}.
 %    \begin{macrocode}
 \cs_new:Npn \@@_if_flat:NTF #1
   {
+    \cs_if_exist:NF #1
+      {
+        \cs_gset_eq:NN #1 \c_empty_prop
+        \@@_if_flat_aux:w \@@_flatten:w \s_@@_mark \use_i:nn
+      }
     \exp_after:wN \@@_if_flat_aux:w #1
     \s_@@_mark \use_ii:nn
     \@@_flatten:w \s_@@_mark \use_i:nn \s_@@_stop





More information about the latex3-commits mailing list.