[latex3-commits] [git/LaTeX3-latex3-latex3] coffins: Initialise coffin props only once scope is clear (a174c18)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Jan 21 00:25:36 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : coffins
Link       : https://github.com/latex3/latex3/commit/a174c18f3f405281b621c4b03d50b3f28144ffe4

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

commit a174c18f3f405281b621c4b03d50b3f28144ffe4
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Jan 20 23:17:43 2019 +0000

    Initialise coffin props only once scope is clear


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

a174c18f3f405281b621c4b03d50b3f28144ffe4
 l3kernel/l3coffins.dtx                     |   37 ++++++++++------------------
 l3kernel/testfiles/m3coffins001.luatex.tlg |   11 ++++++---
 l3kernel/testfiles/m3coffins001.ptex.tlg   |   11 ++++++---
 l3kernel/testfiles/m3coffins001.tlg        |   11 ++++++---
 l3kernel/testfiles/m3coffins001.uptex.tlg  |   11 ++++++---
 l3kernel/testfiles/m3coffins001.xetex.tlg  |   11 ++++++---
 6 files changed, 53 insertions(+), 39 deletions(-)

diff --git a/l3kernel/l3coffins.dtx b/l3kernel/l3coffins.dtx
index 3154ed3..b3c40cb 100644
--- a/l3kernel/l3coffins.dtx
+++ b/l3kernel/l3coffins.dtx
@@ -580,25 +580,14 @@
 %
 % \begin{macro}{\coffin_new:N, \coffin_new:c}
 %   Creating a new coffin means making the underlying box and adding the
-%   data structures. These are created globally, as there is a need to
-%   avoid any strange effects if the coffin is created inside a group.
-%   This means that the usual rule about \cs[no-index]{l_\ldots}
-%   variables has to be broken.  The \cs{debug_suspend:} and
-%   \cs{debug_resume:} functions prevent these checks.  They also
-%   prevent \cs{prop_clear_new:c} from writing useless information to
-%   the log file.
+%   data structures. As the scope here is linked to the box, we suspend
+%   logging.
 %    \begin{macrocode}
 \cs_new_protected:Npn \coffin_new:N #1
   {
     \box_new:N #1
     \debug_suspend:
     \tl_new:c { g_@@_scope_ \@@_to_value:N #1 _tl }
-    \prop_clear_new:c { l_@@_corners_ \@@_to_value:N #1 _prop }
-    \prop_clear_new:c { l_@@_poles_   \@@_to_value:N #1 _prop }
-    \prop_gset_eq:cN { l_@@_corners_ \@@_to_value:N #1 _prop }
-      \c_@@_corners_prop
-    \prop_gset_eq:cN { l_@@_poles_ \@@_to_value:N #1 _prop }
-      \c_@@_poles_prop
     \debug_resume:
   }
 \cs_generate_variant:Nn \coffin_new:N { c }
@@ -1349,6 +1338,17 @@
 %
 % \subsection{Aligning and typesetting of coffins}
 %
+% \begin{variable}{\l_@@_aligned_coffin, \l_@@_aligned_internal_coffin}
+%   Special coffins: these cannot be set up earlier as they need
+%   \cs{coffin_new:N}. These need to have structures set up from the get-go.
+%    \begin{macrocode}
+\coffin_new:N \l_@@_aligned_coffin
+\coffin_new:N \l_@@_aligned_internal_coffin
+\@@_reset_structure:N \l_@@_aligned_coffin
+\@@_reset_structure:N \l_@@_aligned_internal_coffin
+%    \end{macrocode}
+% \end{variable}
+%
 % \begin{macro}
 %   {
 %     \coffin_join:NnnNnnnn, \coffin_join:cnnNnnnn,
@@ -1498,17 +1498,6 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{variable}{\l_@@_aligned_coffin, \l_@@_aligned_internal_coffin}
-%   Special coffins: these cannot be set up earlier as they need
-%   \cs{coffin_new:N}. These need to have structures set up from the get-go.
-%    \begin{macrocode}
-\coffin_new:N \l_@@_aligned_coffin
-\coffin_new:N \l_@@_aligned_internal_coffin
-\@@_reset_structure:N \l_@@_aligned_coffin
-\@@_reset_structure:N \l_@@_aligned_internal_coffin
-%    \end{macrocode}
-% \end{variable}
-%
 % \begin{macro}{\@@_align:NnnNnnnnN}
 %   The internal function aligns the two coffins into a third one, but
 %   performs no corrections on the resulting coffin poles. The process
diff --git a/l3kernel/testfiles/m3coffins001.luatex.tlg b/l3kernel/testfiles/m3coffins001.luatex.tlg
index 555cc0b..98d9a2b 100644
--- a/l3kernel/testfiles/m3coffins001.luatex.tlg
+++ b/l3kernel/testfiles/m3coffins001.luatex.tlg
@@ -50,7 +50,8 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -66,7 +67,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -82,7 +85,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 ! LaTeX3 Error: Unknown coffin '\bbb'.
diff --git a/l3kernel/testfiles/m3coffins001.ptex.tlg b/l3kernel/testfiles/m3coffins001.ptex.tlg
index 4aafed4..e0f5dc6 100644
--- a/l3kernel/testfiles/m3coffins001.ptex.tlg
+++ b/l3kernel/testfiles/m3coffins001.ptex.tlg
@@ -50,7 +50,8 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -66,7 +67,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -82,7 +85,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 ! LaTeX3 Error: Unknown coffin '\bbb'.
diff --git a/l3kernel/testfiles/m3coffins001.tlg b/l3kernel/testfiles/m3coffins001.tlg
index 28c4c77..50fed14 100644
--- a/l3kernel/testfiles/m3coffins001.tlg
+++ b/l3kernel/testfiles/m3coffins001.tlg
@@ -50,7 +50,8 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -66,7 +67,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -82,7 +85,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 ! LaTeX3 Error: Unknown coffin '\bbb'.
diff --git a/l3kernel/testfiles/m3coffins001.uptex.tlg b/l3kernel/testfiles/m3coffins001.uptex.tlg
index 60bc158..1f7a84a 100644
--- a/l3kernel/testfiles/m3coffins001.uptex.tlg
+++ b/l3kernel/testfiles/m3coffins001.uptex.tlg
@@ -50,7 +50,8 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -66,7 +67,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -82,7 +85,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 ! LaTeX3 Error: Unknown coffin '\bbb'.
diff --git a/l3kernel/testfiles/m3coffins001.xetex.tlg b/l3kernel/testfiles/m3coffins001.xetex.tlg
index 4aafed4..e0f5dc6 100644
--- a/l3kernel/testfiles/m3coffins001.xetex.tlg
+++ b/l3kernel/testfiles/m3coffins001.xetex.tlg
@@ -50,7 +50,8 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -66,7 +67,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 Size of coffin \aaa:
@@ -82,7 +85,9 @@ Poles of coffin \aaa:
 >  t  =>  {0pt}{0pt}{1000pt}{0pt}
 >  B  =>  {0pt}{0pt}{1000pt}{0pt}
 >  H  =>  {0pt}{0pt}{1000pt}{0pt}
->  T  =>  {0pt}{0pt}{1000pt}{0pt}.
+>  T  =>  {0pt}{0pt}{1000pt}{0pt}
+>  test-1  =>  {0pt}{0.0pt}{1000pt}{0pt}
+>  test-2  =>  {0.0pt}{0pt}{0pt}{1000pt}.
 <recently read> }
 l. ...}
 ! LaTeX3 Error: Unknown coffin '\bbb'.





More information about the latex3-commits mailing list