[latex3-commits] [git/LaTeX3-latex3-latex3] master: \@@_chk_group_end:n must be before \@@_select:N (1506c7ef5)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Jul 16 12:13:16 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/1506c7ef523b9646efafd960a9faf66d07071783

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

commit 1506c7ef523b9646efafd960a9faf66d07071783
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Thu Jul 2 22:57:27 2020 -0300

    \@@_chk_group_end:n must be before \@@_select:N
    
    And two scratch token lists are needed


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

1506c7ef523b9646efafd960a9faf66d07071783
 l3kernel/l3cctab.dtx | 45 +++++++++++++++++++++++----------------------
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/l3kernel/l3cctab.dtx b/l3kernel/l3cctab.dtx
index e3f5e3373..7f51fd77b 100644
--- a/l3kernel/l3cctab.dtx
+++ b/l3kernel/l3cctab.dtx
@@ -213,13 +213,14 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{variable}{\l_@@_internal_tl}
+% \begin{variable}{\l_@@_internal_a_tl,\l_@@_internal_b_tl}
 %   Scratch space.  For instance, when popping
 %   \cs{g_@@_stack_seq}/\cs{g_@@_unused_seq}, consists of the
 %   catcodetable number (integer denotation) in \LuaTeX{}, or of an
 %   intarray variable (as a single token) in other engines.
 %    \begin{macrocode}
-\tl_new:N \l_@@_internal_tl
+\tl_new:N \l_@@_internal_a_tl
+\tl_new:N \l_@@_internal_b_tl
 %    \end{macrocode}
 % \end{variable}
 %
@@ -441,8 +442,8 @@
     \cs_new_protected:Npn \@@_select:N #1
       {
         \tex_catcodetable:D #1
-        \prop_get:NVNTF \g_@@_endlinechar_prop #1 \l_@@_internal_tl
-          { \int_set:Nn \tex_endlinechar:D { \l_@@_internal_tl } }
+        \prop_get:NVNTF \g_@@_endlinechar_prop #1 \l_@@_internal_a_tl
+          { \int_set:Nn \tex_endlinechar:D { \l_@@_internal_a_tl } }
           { \int_set:Nn \tex_endlinechar:D { 13 } }
         \cs_if_exist:cF { \@@_internal_cctab_name: }
           { \exp_args:Nc \@@_new:N { \@@_internal_cctab_name: } }
@@ -471,7 +472,7 @@
 %   For \cs{cctab_begin:N}/\cs{cctab_end:} we will need to allocate
 %   dynamic tables.  This is done here by \cs{@@_begin_aux:}, which puts
 %   a table number (in \LuaTeX{}) or name (in other engines) into
-%   \cs{l_@@_internal_tl}.  In \LuaTeX{} this simply calls \cs{@@_new:N}
+%   \cs{l_@@_internal_a_tl}.  In \LuaTeX{} this simply calls \cs{@@_new:N}
 %   and uses the resulting catcodetable number; in other engines we need
 %   to give a name to the intarray variable and use that.  In \LuaTeX{},
 %   to restore catcodes at \cs{cctab_end:} we cannot just set
@@ -485,7 +486,7 @@
     \cs_new_protected:Npn \@@_begin_aux:
       {
         \@@_new:N \g_@@_next_cctab
-        \tl_set:NV \l_@@_internal_tl \g_@@_next_cctab
+        \tl_set:NV \l_@@_internal_a_tl \g_@@_next_cctab
         \cs_undefine:N \g_@@_next_cctab
       }
   }
@@ -495,7 +496,7 @@
         \int_gincr:N \g_@@_allocate_int
         \exp_args:Nc \@@_new:N
           { g_@@_ \int_use:N \g_@@_allocate_int _cctab }
-        \exp_args:NNc \tl_set:Nn \l_@@_internal_tl
+        \exp_args:NNc \tl_set:Nn \l_@@_internal_a_tl
           { g_@@_ \int_use:N \g_@@_allocate_int _cctab }
       }
   }
@@ -505,23 +506,23 @@
 %
 % \begin{macro}{\cctab_begin:N, \cctab_begin:c}
 %   Check the \meta{cctab~var} exists, to avoid low-level errors.  Get
-%   in \cs{l_@@_internal_tl} the number/name of a dynamic table, either
+%   in \cs{l_@@_internal_a_tl} the number/name of a dynamic table, either
 %   from \cs{g_@@_unused_seq} where we save tables that are not
 %   currently in use, or from \cs{@@_begin_aux:} if none are available.
 %   Then save the current catcodes into the table (pointed to by)
-%   \cs{l_@@_internal_tl} and save that table number in a stack before
+%   \cs{l_@@_internal_a_tl} and save that table number in a stack before
 %   selecting the desired catcodes.
 %    \begin{macrocode}
 \cs_new_protected:Npn \cctab_begin:N #1
   {
     \@@_chk_if_valid:NT #1
       {
-        \seq_gpop:NNF \g_@@_unused_seq \l_@@_internal_tl
+        \seq_gpop:NNF \g_@@_unused_seq \l_@@_internal_a_tl
           { \@@_begin_aux: }
         \exp_args:Nx \@@_chk_group_begin:n
-          { \@@_nesting_number:N \l_@@_internal_tl }
-        \seq_gpush:NV \g_@@_stack_seq \l_@@_internal_tl
-        \exp_args:NV \@@_gset:n \l_@@_internal_tl
+          { \@@_nesting_number:N \l_@@_internal_a_tl }
+        \seq_gpush:NV \g_@@_stack_seq \l_@@_internal_a_tl
+        \exp_args:NV \@@_gset:n \l_@@_internal_a_tl
         \@@_select:N #1
       }
   }
@@ -531,19 +532,19 @@
 %
 % \begin{macro}{\cctab_end:}
 %   Make sure a \cs{cctab_begin:N} was used some time earlier, get in
-%   \cs{l_@@_internal_tl} the catcode table number/name in which the
+%   \cs{l_@@_internal_a_tl} the catcode table number/name in which the
 %   prevailing catcodes were stored, then restore these catcodes.  The
 %   dynamic table is now unused hence stored in \cs{g_@@_unused_seq} for
 %   recycling by later \cs{cctab_begin:N}.
 %    \begin{macrocode}
 \cs_new_protected:Npn \cctab_end:
   {
-    \seq_gpop:NNTF \g_@@_stack_seq \l_@@_internal_tl
+    \seq_gpop:NNTF \g_@@_stack_seq \l_@@_internal_a_tl
       {
-        \seq_gpush:NV \g_@@_unused_seq \l_@@_internal_tl
-        \@@_select:N \l_@@_internal_tl
+        \seq_gpush:NV \g_@@_unused_seq \l_@@_internal_a_tl
         \exp_args:Nx \@@_chk_group_end:n
-          { \@@_nesting_number:N \l_@@_internal_tl }
+          { \@@_nesting_number:N \l_@@_internal_a_tl }
+        \@@_select:N \l_@@_internal_a_tl
       }
       { \__kernel_msg_error:nn { kernel } { cctab-extra-end } }
   }
@@ -580,11 +581,11 @@
   }
 \cs_new_protected:Npn \@@_chk_group_end:n #1
   {
-    \seq_gpop:NN \g_@@_group_seq \l_@@_internal_tl
+    \seq_gpop:NN \g_@@_group_seq \l_@@_internal_b_tl
     \int_compare:nNnTF
-        { \tex_currentgrouplevel:D } = { \l_@@_internal_tl }
+        { \tex_currentgrouplevel:D } = { \l_@@_internal_b_tl }
       {
-        \cs_if_exist:cF { @@_group_ \l_@@_internal_tl _ #1 _chk: }
+        \cs_if_exist:cF { @@_group_ \l_@@_internal_b_tl _ #1 _chk: }
           {
             \__kernel_msg_error:nnx { kernel } { cctab-group-mismatch }
               { different~group }
@@ -594,7 +595,7 @@
         \__kernel_msg_error:nnx { kernel } { cctab-group-mismatch }
           {
             \int_compare:nNnTF
-                { \tex_currentgrouplevel:D } < { \l_@@_internal_tl }
+                { \tex_currentgrouplevel:D } < { \l_@@_internal_b_tl }
               { lower } { higher } ~group~level
           }
       }





More information about the latex3-commits mailing list.