[latex3-commits] [git/LaTeX3-latex3-latex3] master: Drop \__prg_case_end:nw (53ea9f1)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Mar 14 18:29:39 CET 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/53ea9f11dce2e5d52148c93653495f450539383e

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

commit 53ea9f11dce2e5d52148c93653495f450539383e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Mar 14 17:11:05 2018 +0000

    Drop \__prg_case_end:nw
    
    This one saves us one \__... and is pretty straight-forward:
    yes, we copy a bit of code but there is not really an issue.
    In any case each implementation is different.


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

53ea9f11dce2e5d52148c93653495f450539383e
 l3kernel/l3basics.dtx                   |   11 -----------
 l3kernel/l3int.dtx                      |    5 +++--
 l3kernel/l3skip.dtx                     |    3 ++-
 l3kernel/l3str.dtx                      |    3 ++-
 l3kernel/l3tl.dtx                       |    5 +----
 l3kernel/testfiles/m3expl001.luatex.tlg |    1 -
 l3kernel/testfiles/m3expl001.ptex.tlg   |    1 -
 l3kernel/testfiles/m3expl001.tlg        |    1 -
 l3kernel/testfiles/m3expl001.uptex.tlg  |    1 -
 l3kernel/testfiles/m3expl001.xetex.tlg  |    1 -
 l3kernel/testfiles/m3expl003.luatex.tlg |    1 -
 l3kernel/testfiles/m3expl003.ptex.tlg   |    1 -
 l3kernel/testfiles/m3expl003.tlg        |    1 -
 l3kernel/testfiles/m3expl003.uptex.tlg  |    1 -
 l3kernel/testfiles/m3expl003.xetex.tlg  |    1 -
 15 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index a174346..5ab37b9 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1386,17 +1386,6 @@
 %   form similar to \cs{__kernel_register_show:N}.
 % \end{function}
 %
-% \begin{function}[EXP]{\__prg_case_end:nw}
-%   \begin{syntax}
-%     \cs{__prg_case_end:nw} \Arg{code} \meta{tokens} \cs{q_mark} \Arg{true code} \cs{q_mark} \Arg{false code}  \cs{q_stop}
-%   \end{syntax}
-%   Used to terminate case statements (\cs{int_case:nnTF}, \emph{etc.})
-%   by removing trailing \meta{tokens} and the end marker
-%   \cs{q_stop}, inserting the \meta{code} for the successful
-%   case (if one is found) and either the \texttt{true code} or
-%   \texttt{false code} for the over all outcome, as appropriate.
-% \end{function}
-%
 % \end{documentation}
 %
 % \begin{implementation}
diff --git a/l3kernel/l3int.dtx b/l3kernel/l3int.dtx
index 2d9deaf..572ff22 100644
--- a/l3kernel/l3int.dtx
+++ b/l3kernel/l3int.dtx
@@ -1649,7 +1649,7 @@
 % \begin{macro}{\@@_case:nw, \@@_case_end:nw}
 %   For integer cases, the first task to fully expand the check
 %   condition. The over all idea is then much the same as for
-%   \cs{str_case:nn(TF)} as described in \pkg{l3basics}.
+%   \cs{tl_case:nn(TF)} as described in \pkg{l3tl}.
 %    \begin{macrocode}
 \cs_new:Npn \int_case:nnTF #1
   {
@@ -1679,7 +1679,8 @@
       { \@@_case_end:nw {#3} }
       { \@@_case:nw {#1} }
   }
-\cs_new_eq:NN \@@_case_end:nw \__prg_case_end:nw
+\cs_new:Npn \@@_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
+  { \exp_end: #1 #4 }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
diff --git a/l3kernel/l3skip.dtx b/l3kernel/l3skip.dtx
index 250f71b..5666a3e 100644
--- a/l3kernel/l3skip.dtx
+++ b/l3kernel/l3skip.dtx
@@ -1452,7 +1452,8 @@
       { \@@_case_end:nw {#3} }
       { \@@_case:nw {#1} }
   }
-\cs_new_eq:NN \@@_case_end:nw \__prg_case_end:nw
+\cs_new:Npn \@@_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
+  { \exp_end: #1 #4 }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
diff --git a/l3kernel/l3str.dtx b/l3kernel/l3str.dtx
index b91dc33..b1fdb82 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -1278,7 +1278,8 @@
       { \@@_case_end:nw {#3} }
       { \@@_case_x:nw {#1} }
   }
-\cs_new_eq:NN \@@_case_end:nw \__prg_case_end:nw
+\cs_new:Npn \@@_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
+  { \exp_end: #1 #4 }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index a655fe1..75cac4d 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -2134,7 +2134,6 @@
 % \begin{macro}[EXP, noTF]{\tl_case:Nn, \tl_case:cn}
 % \begin{macro}[EXP]{\@@_case:nnTF}
 % \begin{macro}[EXP]{\@@_case:Nw}
-% \begin{macro}[EXP]{\__prg_case_end:nw}
 % \begin{macro}[EXP]{\@@_case_end:nw}
 %   The aim here is to allow the case statement to be evaluated
 %   using a known number of expansion steps (two), and without
@@ -2187,15 +2186,13 @@
 %   the first \cs{q_mark} and so |#4| is the \texttt{false} code (the
 %   \texttt{true} code is mopped up by |#3|).
 %    \begin{macrocode}
-\cs_new:Npn \__prg_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
+\cs_new:Npn \@@_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
   { \exp_end: #1 #4 }
-\cs_new_eq:NN \@@_case_end:nw \__prg_case_end:nw
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \end{macro}
 % \end{macro}
-% \end{macro}
 %
 % \subsection{Mapping to token lists}
 %
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index bb2d676..9190289 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -500,7 +500,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index f9aa264..1d39bfc 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -499,7 +499,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 35b7509..8e39bcc 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -499,7 +499,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 17dd643..1115130 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -499,7 +499,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 60e1911..6ece754 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -499,7 +499,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index bb2d676..9190289 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -500,7 +500,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index f9aa264..1d39bfc 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -499,7 +499,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 35b7509..8e39bcc 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -499,7 +499,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 17dd643..1115130 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -499,7 +499,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 60e1911..6ece754 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -499,7 +499,6 @@ Defining \tl_case:cn on line ...
 Defining \tl_case:cnT on line ...
 Defining \tl_case:cnF on line ...
 Defining \tl_case:cnTF on line ...
-Defining \__prg_case_end:nw on line ...
 Defining \__tl_case_end:nw on line ...
 Defining \tl_map_function:nN on line ...
 Defining \tl_map_function:NN on line ...





More information about the latex3-commits mailing list