[latex3-commits] [git/LaTeX3-latex3-latex3] master: Use 'local' names for dynamic mapping functions (9b93e2a)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Mar 27 11:50:45 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/9b93e2a802d96c5a40d03c675f90e9b7daaaab17

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

commit 9b93e2a802d96c5a40d03c675f90e9b7daaaab17
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Mar 27 10:43:47 2018 +0100

    Use 'local' names for dynamic mapping functions


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

9b93e2a802d96c5a40d03c675f90e9b7daaaab17
 l3kernel/l3clist.dtx                 |    4 ++--
 l3kernel/l3file.dtx                  |    2 +-
 l3kernel/l3fp-logic.dtx              |    4 ++--
 l3kernel/l3int.dtx                   |    4 ++--
 l3kernel/l3prg.dtx                   |    6 ++++--
 l3kernel/l3prop.dtx                  |    4 ++--
 l3kernel/l3seq.dtx                   |    4 ++--
 l3kernel/l3skip.dtx                  |    4 ++--
 l3kernel/l3str.dtx                   |    4 ++--
 l3kernel/l3tl.dtx                    |    4 ++--
 l3kernel/testfiles/m3fp-logic004.tlg |    8 ++++----
 l3kernel/testfiles/m3int003.tlg      |    4 ++--
 l3kernel/testfiles/m3skip006.tlg     |    4 ++--
 13 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/l3kernel/l3clist.dtx b/l3kernel/l3clist.dtx
index ceda854..fdf52f1 100644
--- a/l3kernel/l3clist.dtx
+++ b/l3kernel/l3clist.dtx
@@ -1540,9 +1540,9 @@
       {
         \int_gincr:N \g__prg_map_int
         \cs_gset_protected:cpn
-          { __prg_map_ \int_use:N \g__prg_map_int :w } ##1 {#2}
+          { @@_map_ \int_use:N \g__prg_map_int :w } ##1 {#2}
         \exp_last_unbraced:Nco \@@_map_function:Nw
-          { __prg_map_ \int_use:N \g__prg_map_int :w }
+          { @@_map_ \int_use:N \g__prg_map_int :w }
           #1 , \q_recursion_tail ,
         \prg_break_point:Nn \clist_map_break:
           { \int_gdecr:N \g__prg_map_int }
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index 9b74350..bfbc67f 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -1455,7 +1455,7 @@
   {
     \int_gincr:N \g__prg_map_int
     \exp_args:Nc \@@_map_inline:NNNn
-      { __prg_map_ \int_use:N \g__prg_map_int :n }
+      { @@_map_ \int_use:N \g__prg_map_int :n }
   }
 \cs_new_protected:Npn \@@_map_inline:NNNn #1#2#3#4
   {
diff --git a/l3kernel/l3fp-logic.dtx b/l3kernel/l3fp-logic.dtx
index 92b7942..f83bb77 100644
--- a/l3kernel/l3fp-logic.dtx
+++ b/l3kernel/l3fp-logic.dtx
@@ -460,14 +460,14 @@
     \int_gincr:N \g__prg_map_int
     \exp_args:NNc \@@_step:NNnnnn
       \cs_gset_protected:Npn
-      { __prg_map_ \int_use:N \g__prg_map_int :w }
+      { @@_map_ \int_use:N \g__prg_map_int :w }
   }
 \cs_new_protected:Npn \fp_step_variable:nnnNn #1#2#3#4#5
   {
     \int_gincr:N \g__prg_map_int
     \exp_args:NNc \@@_step:NNnnnn
       \cs_gset_protected:Npx
-      { __prg_map_ \int_use:N \g__prg_map_int :w }
+      { @@_map_ \int_use:N \g__prg_map_int :w }
       {#1} {#2} {#3}
       {
         \tl_set:Nn \exp_not:N #4 {##1}
diff --git a/l3kernel/l3int.dtx b/l3kernel/l3int.dtx
index b805f22..52ec899 100644
--- a/l3kernel/l3int.dtx
+++ b/l3kernel/l3int.dtx
@@ -1855,14 +1855,14 @@
     \int_gincr:N \g__prg_map_int
     \exp_args:NNc \@@_step:NNnnnn
       \cs_gset_protected:Npn
-      { __prg_map_ \int_use:N \g__prg_map_int :w }
+      { @@_map_ \int_use:N \g__prg_map_int :w }
   }
 \cs_new_protected:Npn \int_step_variable:nnnNn #1#2#3#4#5
   {
     \int_gincr:N \g__prg_map_int
     \exp_args:NNc \@@_step:NNnnnn
       \cs_gset_protected:Npx
-      { __prg_map_ \int_use:N \g__prg_map_int :w }
+      { @@_map_ \int_use:N \g__prg_map_int :w }
       {#1}{#2}{#3}
       {
         \tl_set:Nn \exp_not:N #4 {##1}
diff --git a/l3kernel/l3prg.dtx b/l3kernel/l3prg.dtx
index 05c7a36..ff70cc1 100644
--- a/l3kernel/l3prg.dtx
+++ b/l3kernel/l3prg.dtx
@@ -714,8 +714,10 @@
 %
 % \begin{variable}{\g__prg_map_int}
 %   This integer is used by non-expandable mapping functions to track
-%   the level of nesting in force.  The functions \cs{__prg_map_1:w},
-%   \cs{__prg_map_2:w}, \emph{etc.}, labelled by \cs{g__prg_map_int}
+%   the level of nesting in force.  The functions
+%   \cs[no-index]{\meta{type}_map_1:w},
+%   \cs[no-index]{\meta{type}_map_2:w}, \emph{etc.}, labelled by
+%   \cs{g__prg_map_int}
 %   hold functions to be mapped over various list datatypes in inline
 %   and variable mappings.
 % \end{variable}
diff --git a/l3kernel/l3prop.dtx b/l3kernel/l3prop.dtx
index aba0c6b..9bf27bf 100644
--- a/l3kernel/l3prop.dtx
+++ b/l3kernel/l3prop.dtx
@@ -1145,7 +1145,7 @@
 \cs_new_protected:Npn \prop_map_inline:Nn #1#2
   {
     \cs_gset_eq:cN
-      { __prg_map_ \int_use:N \g__prg_map_int :wn } \@@_pair:wn
+      { @@_map_ \int_use:N \g__prg_map_int :wn } \@@_pair:wn
     \int_gincr:N \g__prg_map_int
     \cs_gset_protected:Npn \@@_pair:wn ##1 \s_@@ ##2 {#2}
     #1
@@ -1153,7 +1153,7 @@
       {
         \int_gdecr:N \g__prg_map_int
         \cs_gset_eq:Nc \@@_pair:wn
-          { __prg_map_ \int_use:N \g__prg_map_int :wn }
+          { @@_map_ \int_use:N \g__prg_map_int :wn }
       }
   }
 \cs_generate_variant:Nn \prop_map_inline:Nn { c }
diff --git a/l3kernel/l3seq.dtx b/l3kernel/l3seq.dtx
index b8527ca..ae93a34 100644
--- a/l3kernel/l3seq.dtx
+++ b/l3kernel/l3seq.dtx
@@ -1767,13 +1767,13 @@
 \cs_new_protected:Npn \@@_push_item_def:
   {
     \int_gincr:N \g__prg_map_int
-    \cs_gset_eq:cN { __prg_map_ \int_use:N \g__prg_map_int :w }
+    \cs_gset_eq:cN { @@_map_ \int_use:N \g__prg_map_int :w }
       \@@_item:n
   }
 \cs_new_protected:Npn \@@_pop_item_def:
   {
     \cs_gset_eq:Nc \@@_item:n
-      { __prg_map_ \int_use:N \g__prg_map_int :w }
+      { @@_map_ \int_use:N \g__prg_map_int :w }
     \int_gdecr:N \g__prg_map_int
   }
 %    \end{macrocode}
diff --git a/l3kernel/l3skip.dtx b/l3kernel/l3skip.dtx
index 8098bce..b992724 100644
--- a/l3kernel/l3skip.dtx
+++ b/l3kernel/l3skip.dtx
@@ -1619,14 +1619,14 @@
     \int_gincr:N \g__prg_map_int
     \exp_args:NNc \@@_step:NNnnnn
       \cs_gset_protected:Npn
-      { __prg_map_ \int_use:N \g__prg_map_int :w }
+      { @@_map_ \int_use:N \g__prg_map_int :w }
   }
 \cs_new_protected:Npn \dim_step_variable:nnnNn #1#2#3#4#5
   {
     \int_gincr:N \g__prg_map_int
     \exp_args:NNc \@@_step:NNnnnn
       \cs_gset_protected:Npx
-      { __prg_map_ \int_use:N \g__prg_map_int :w }
+      { @@_map_ \int_use:N \g__prg_map_int :w }
       {#1}{#2}{#3}
       {
         \tl_set:Nn \exp_not:N #4 {##1}
diff --git a/l3kernel/l3str.dtx b/l3kernel/l3str.dtx
index 8c3289a..d19983a 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -1347,11 +1347,11 @@
   {
     \int_gincr:N \g__prg_map_int
     \cs_gset_protected:cpn
-      { __prg_map_ \int_use:N \g__prg_map_int :w } ##1 {#2}
+      { @@_map_ \int_use:N \g__prg_map_int :w } ##1 {#2}
     \use:x
       {
         \exp_not:N \@@_map_inline:NN
-        \exp_not:c { __prg_map_ \int_use:N \g__prg_map_int :w }
+        \exp_not:c { @@_map_ \int_use:N \g__prg_map_int :w }
         \@@_to_other_fast:n {#1}
       }
       \q_recursion_tail
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 217ec60..6af759d 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -2233,9 +2233,9 @@
   {
     \int_gincr:N \g__prg_map_int
     \cs_gset_protected:cpn
-      { __prg_map_ \int_use:N \g__prg_map_int :w } ##1 {#2}
+      { @@_map_ \int_use:N \g__prg_map_int :w } ##1 {#2}
     \exp_args:Nc \@@_map_function:Nn
-      { __prg_map_ \int_use:N \g__prg_map_int :w }
+      { @@_map_ \int_use:N \g__prg_map_int :w }
       #1 \q_recursion_tail
     \prg_break_point:Nn \tl_map_break: { \int_gdecr:N \g__prg_map_int }
   }
diff --git a/l3kernel/testfiles/m3fp-logic004.tlg b/l3kernel/testfiles/m3fp-logic004.tlg
index fae0e19..e4fc905 100644
--- a/l3kernel/testfiles/m3fp-logic004.tlg
+++ b/l3kernel/testfiles/m3fp-logic004.tlg
@@ -117,7 +117,7 @@ TEST 2: fp_step_inline
 0
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Zero step size for step function \__prg_map_1:w .
+                           Zero step size for step function \__fp_map_1:w .
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -126,7 +126,7 @@ spelling (e.g., `I\hbox'). Otherwise just continue,
 and I'll forget about whatever was undefined.
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Invalid step size inf in step function \__prg_map...
+                           Invalid step size inf in step function \__fp_map_...
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -192,7 +192,7 @@ TEST 3: fp_step_variable
 0
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Zero step size for step function \__prg_map_1:w .
+                           Zero step size for step function \__fp_map_1:w .
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -201,7 +201,7 @@ spelling (e.g., `I\hbox'). Otherwise just continue,
 and I'll forget about whatever was undefined.
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Invalid step size inf in step function \__prg_map...
+                           Invalid step size inf in step function \__fp_map_...
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
diff --git a/l3kernel/testfiles/m3int003.tlg b/l3kernel/testfiles/m3int003.tlg
index 71fa58d..ed84aed 100644
--- a/l3kernel/testfiles/m3int003.tlg
+++ b/l3kernel/testfiles/m3int003.tlg
@@ -151,7 +151,7 @@ NO
 ============================================================
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Zero step size for step function \__prg_map_1:w .
+                           Zero step size for step function \__int_map_1:w .
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -183,7 +183,7 @@ NO
 ============================================================
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Zero step size for step function \__prg_map_1:w .
+                           Zero step size for step function \__int_map_1:w .
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
diff --git a/l3kernel/testfiles/m3skip006.tlg b/l3kernel/testfiles/m3skip006.tlg
index 2ad25c5..e5c9dac 100644
--- a/l3kernel/testfiles/m3skip006.tlg
+++ b/l3kernel/testfiles/m3skip006.tlg
@@ -41,7 +41,7 @@ TEST 2: dim_step_inline
 0.09995pt
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Zero step size for step function \__prg_map_1:w .
+                           Zero step size for step function \__dim_map_1:w .
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -74,7 +74,7 @@ TEST 3: dim_step_variable
 0.09995pt
 ! Undefined control sequence.
 <argument> \LaTeX3 error: 
-                           Zero step size for step function \__prg_map_1:w .
+                           Zero step size for step function \__dim_map_1:w .
 l. ...  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have





More information about the latex3-commits mailing list