[latex3-commits] [git/LaTeX3-latex3-latex3] master: Rename \token_get_..._spec:N to \cs_..._spec:N (9053824)

Bruno Le Floch bruno at le-floch.fr
Wed Feb 27 21:51:49 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/905382435fa914cd2d15928e6c12e54186e3851a

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

commit 905382435fa914cd2d15928e6c12e54186e3851a
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Wed Feb 27 21:49:14 2019 +0100

    Rename \token_get_..._spec:N to \cs_..._spec:N


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

905382435fa914cd2d15928e6c12e54186e3851a
 l3kernel/CHANGELOG.md                    |    3 +
 l3kernel/l3basics.dtx                    |  120 ++++++++++++++++++++++++++++-
 l3kernel/l3keys.dtx                      |    2 +-
 l3kernel/l3obsolete.txt                  |    3 +
 l3kernel/l3token.dtx                     |  124 ++++--------------------------
 l3kernel/testfiles/m3expl001.luatex.tlg  |    5 +-
 l3kernel/testfiles/m3expl001.ptex.tlg    |    5 +-
 l3kernel/testfiles/m3expl001.tlg         |    5 +-
 l3kernel/testfiles/m3expl001.uptex.tlg   |    5 +-
 l3kernel/testfiles/m3expl001.xetex.tlg   |    5 +-
 l3kernel/testfiles/m3expl003.luatex.tlg  |    5 +-
 l3kernel/testfiles/m3expl003.ptex.tlg    |    5 +-
 l3kernel/testfiles/m3expl003.tlg         |    5 +-
 l3kernel/testfiles/m3expl003.uptex.tlg   |    5 +-
 l3kernel/testfiles/m3expl003.xetex.tlg   |    5 +-
 l3kernel/testfiles/m3token002.luatex.tlg |    2 +-
 l3kernel/testfiles/m3token002.lvt        |   16 ++--
 l3kernel/testfiles/m3token002.tlg        |    2 +-
 l3packages/xparse/xparse.dtx             |    4 +-
 l3trial/l3check/l3check.dtx              |   12 ++-
 20 files changed, 198 insertions(+), 140 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index da8dd1e..536495f 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -19,6 +19,9 @@ this project uses date-based 'snapshot' version identifiers.
 - Moved coffin affine transformations to stable
 - Moved `\tl_count_tokens:n` to stable
 - Completed emulation of e-type argument when \expanded is unavailable
+- Renamed `\token_get_prefix_spec:N`, `\token_get_arg_spec:N`,
+  `\token_get_replacement_spec:N` as `\cs_prefix_spec:N`,
+  `\cs_argument_spec:N`, `\cs_replacement_spec:N`, respectively
 
 ### Removed
 
diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index 192c3db..cf53899 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -802,7 +802,7 @@
 %   of the result.
 % \end{function}
 %
-% \section{Analysing control sequence names}
+% \section{Analysing control sequences}
 %
 % \begin{function}[EXP, added = 2018-04-06]{\cs_split_function:N}
 %   \begin{syntax}
@@ -819,6 +819,70 @@
 %   (other).
 % \end{function}
 %
+% The next three functions decompose \TeX{} macros into their
+% constituent parts: if the \meta{token} passed is not a macro then no
+% decomposition can occur. In the latter case, all three functions leave
+% \cs{scan_stop:} in the input stream.
+%
+% \begin{function}[EXP, added = 2019-02-27]{\cs_prefix_spec:N}
+%   \begin{syntax}
+%     \cs{cs_prefix_spec:N} \meta{token}
+%   \end{syntax}
+%   If the \meta{token} is a macro, this function leaves the applicable
+%   \TeX{} prefixes in input stream as a string of tokens of category
+%   code $12$ (with spaces having category code $10$). Thus for example
+%   \begin{verbatim}
+%     \cs_set:Npn \next:nn #1#2 { x #1~y #2 }
+%     \cs_prefix_spec:N \next:nn
+%   \end{verbatim}
+%   leaves |\long| in the input stream. If the \meta{token} is
+%   not a macro then \cs{scan_stop:} is left in the input stream.
+%   \begin{texnote}
+%     The prefix can be empty, |\long|, |\protected| or
+%     |\protected\long| with backslash replaced by the current escape
+%     character.
+%   \end{texnote}
+% \end{function}
+%
+% \begin{function}[EXP, added = 2019-02-27]{\cs_argument_spec:N}
+%   \begin{syntax}
+%     \cs{cs_argument_spec:N} \meta{token}
+%   \end{syntax}
+%   If the \meta{token} is a macro, this function leaves the primitive
+%   \TeX{} argument specification in input stream as a string of
+%   character tokens of category code $12$ (with spaces having category
+%   code $10$). Thus for example
+%   \begin{verbatim}
+%     \cs_set:Npn \next:nn #1#2 { x #1 y #2 }
+%     \cs_argument_spec:N \next:nn
+%   \end{verbatim}
+%   leaves |#1#2| in the input stream. If the \meta{token} is
+%   not a macro then \cs{scan_stop:} is left in the input stream.
+%   \begin{texnote}
+%     If the argument specification contains the string |->|, then the
+%     function produces incorrect results.
+%   \end{texnote}
+% \end{function}
+%
+% \begin{function}[EXP, added = 2019-02-27]{\cs_replacement_spec:N}
+%   \begin{syntax}
+%     \cs{cs_replacement_spec:N} \meta{token}
+%   \end{syntax}
+%   If the \meta{token} is a macro, this function leaves the replacement
+%   text in input stream as a string of character tokens of category
+%   code $12$ (with spaces having category code $10$). Thus for example
+%   \begin{verbatim}
+%     \cs_set:Npn \next:nn #1#2 { x #1~y #2 }
+%     \cs_replacement_spec:N \next:nn
+%   \end{verbatim}
+%   leaves \verb*|x#1 y#2| in the input stream. If the \meta{token} is
+%   not a macro then \cs{scan_stop:} is left in the input stream.
+%   \begin{texnote}
+%     If the argument specification contains the string |->|, then the
+%     function produces incorrect results.
+%   \end{texnote}
+% \end{function}
+%
 % \section{Using or removing tokens and arguments}
 %
 % Tokens in the input can be read and used or read and discarded.
@@ -3470,6 +3534,60 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \subsection{Decomposing a macro definition}
+%
+% \begin{macro}{\cs_prefix_spec:N}
+% \begin{macro}{\cs_argument_spec:N}
+% \begin{macro}{\cs_replacement_spec:N}
+% \begin{macro}{\@@_prefix_arg_replacement:wN}
+%   We sometimes want to test if a control sequence can be expanded to
+%   reveal a hidden value. However, we cannot just expand the macro
+%   blindly as it may have arguments and none might be
+%   present. Therefore we define these functions to pick either the
+%   prefix(es), the argument specification, or the replacement text from
+%   a macro. All of this information is returned as characters with
+%   catcode~$12$. If the token in question isn't a macro, the token
+%   \cs{scan_stop:} is returned instead.
+%    \begin{macrocode}
+\use:x
+  {
+    \exp_not:n { \cs_new:Npn \@@_prefix_arg_replacement:wN #1 }
+    \tl_to_str:n { macro : } \exp_not:n { #2 -> #3 \q_stop #4 }
+  }
+  { #4 {#1} {#2} {#3} }
+\cs_new:Npn \cs_prefix_spec:N #1
+  {
+    \token_if_macro:NTF #1
+      {
+        \exp_after:wN \@@_prefix_arg_replacement:wN
+          \token_to_meaning:N #1 \q_stop \use_i:nnn
+      }
+      { \scan_stop: }
+  }
+\cs_new:Npn \cs_argument_spec:N #1
+  {
+    \token_if_macro:NTF #1
+      {
+        \exp_after:wN \@@_prefix_arg_replacement:wN
+          \token_to_meaning:N #1 \q_stop \use_ii:nnn
+      }
+      { \scan_stop: }
+  }
+\cs_new:Npn \cs_replacement_spec:N #1
+  {
+    \token_if_macro:NTF #1
+      {
+        \exp_after:wN \@@_prefix_arg_replacement:wN
+          \token_to_meaning:N #1 \q_stop \use_iii:nnn
+      }
+      { \scan_stop: }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
 % \subsection{Doing nothing functions}
 %
 % \begin{macro}[EXP]{\prg_do_nothing:}
diff --git a/l3kernel/l3keys.dtx b/l3kernel/l3keys.dtx
index 36d0ccc..10023cb 100644
--- a/l3kernel/l3keys.dtx
+++ b/l3kernel/l3keys.dtx
@@ -2706,7 +2706,7 @@
           {
             \exp_args:Nnf \msg_show_item_unbraced:nn { code }
               {
-                \exp_args:Nc \token_get_replacement_spec:N
+                \exp_args:Nc \cs_replacement_spec:N
                   {
                     \c_@@_code_root_tl
                     \@@_trim_spaces:n { #2 / #3 }
diff --git a/l3kernel/l3obsolete.txt b/l3kernel/l3obsolete.txt
index 6be97ee..a993bc1 100644
--- a/l3kernel/l3obsolete.txt
+++ b/l3kernel/l3obsolete.txt
@@ -76,6 +76,9 @@ Function                   Expires end
 \tl_set_from_file:Nnn             2020
 \tl_set_from_file_x:cnn           2020
 \tl_set_from_file_x:Nnn           2020
+\token_get_arg_spec:N             2020
+\token_get_prefix_spec:N          2020
+\token_get_replacement_spec:N     2020
 \uptex_...:D                      2019
 \utex_...:D                       2019
 \vbox_unpack_clear:c              2020
diff --git a/l3kernel/l3token.dtx b/l3kernel/l3token.dtx
index f333855..c4cf56f 100644
--- a/l3kernel/l3token.dtx
+++ b/l3kernel/l3token.dtx
@@ -931,66 +931,6 @@
 %   (as appropriate to the result of the test).
 % \end{function}
 %
-% \section{Decomposing a macro definition}
-%
-% These functions decompose \TeX{} macros into their constituent
-% parts: if the \meta{token} passed is not a macro then no decomposition
-% can occur. In the latter case, all three functions leave \cs{scan_stop:}
-% in the input stream.
-%
-% \begin{function}[EXP]{\token_get_arg_spec:N}
-%   \begin{syntax}
-%     \cs{token_get_arg_spec:N} \meta{token}
-%   \end{syntax}
-%   If the \meta{token} is a macro, this function leaves
-%   the primitive \TeX{} argument specification in input stream as
-%   a string of tokens of category code $12$ (with spaces having category
-%   code $10$). Thus for example for a token \cs{next} defined by
-%   \begin{verbatim}
-%     \cs_set:Npn \next #1#2 { x #1 y #2 }
-%   \end{verbatim}
-%   leaves |#1#2| in the input stream. If the \meta{token} is
-%   not a macro then \cs{scan_stop:} is left in the input stream.
-%   \begin{texnote}
-%     If the arg~spec. contains the string |->|, then the |spec| function
-%     produces incorrect results.
-%   \end{texnote}
-% \end{function}
-%
-% \begin{function}[EXP]{\token_get_replacement_spec:N}
-%   \begin{syntax}
-%     \cs{token_get_replacement_spec:N} \meta{token}
-%   \end{syntax}
-%   If the \meta{token} is a macro, this function leaves
-%   the replacement text in input stream as
-%   a string of tokens of category code $12$ (with spaces having category
-%   code $10$). Thus for example for a token \cs{next} defined by
-%   \begin{verbatim}
-%     \cs_set:Npn \next #1#2 { x #1~y #2 }
-%   \end{verbatim}
-%   leaves \verb|x#1 y#2| in the input stream. If the \meta{token} is
-%   not a macro then \cs{scan_stop:} is left in the input stream.
-%   \begin{texnote}
-%     If the arg~spec. contains the string |->|, then the |spec| function
-%     produces incorrect results.
-%   \end{texnote}
-% \end{function}
-%
-% \begin{function}[EXP]{\token_get_prefix_spec:N}
-%   \begin{syntax}
-%     \cs{token_get_prefix_spec:N} \meta{token}
-%   \end{syntax}
-%   If the \meta{token} is a macro, this function leaves
-%   the \TeX{} prefixes applicable in input stream as
-%   a string of tokens of category code $12$ (with spaces having category
-%   code $10$). Thus for example for a token \cs{next} defined by
-%   \begin{verbatim}
-%     \cs_set:Npn \next #1#2 { x #1~y #2 }
-%   \end{verbatim}
-%   leaves |\long| in the input stream. If the \meta{token} is
-%   not a macro then \cs{scan_stop:} is left in the input stream
-% \end{function}
-%
 % \section{Description of all possible tokens}
 % \label{sec:l3token:all-tokens}
 %
@@ -2465,58 +2405,24 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Decomposing a macro definition}
-%
-% \begin{macro}{\token_get_prefix_spec:N}
-% \begin{macro}{\token_get_arg_spec:N}
-% \begin{macro}{\token_get_replacement_spec:N}
-% \begin{macro}{\@@_get_prefix_arg_replacement:wN}
-%   We sometimes want to test if a
-%   control sequence can be expanded to reveal a hidden
-%   value. However, we cannot just expand the macro blindly as it may
-%   have arguments and none might be present. Therefore we define
-%   these functions to pick either the prefix(es), the argument
-%   specification, or the replacement text from a macro. All of this
-%   information is returned as characters with catcode~$12$. If the
-%   token in question isn't a macro, the token \cs{scan_stop:} is
-%   returned instead.
+% \subsection{Deprecated functions}
+%
+% \begin{macro}[EXP, deprecated = 2020-12-31]
+%   {
+%     \token_get_prefix_spec:N,
+%     \token_get_arg_spec:N,
+%     \token_get_replacement_spec:N
+%   }
+%   For removal after 2020-12-31.
 %    \begin{macrocode}
-\exp_args:Nno \use:nn
-  { \cs_new:Npn \@@_get_prefix_arg_replacement:wN #1 }
-  { \tl_to_str:n { macro : } #2 -> #3 \q_stop #4 }
-  { #4 {#1} {#2} {#3} }
-\cs_new:Npn \token_get_prefix_spec:N #1
-  {
-    \token_if_macro:NTF #1
-      {
-        \exp_after:wN \@@_get_prefix_arg_replacement:wN
-          \token_to_meaning:N #1 \q_stop \use_i:nnn
-      }
-      { \scan_stop: }
-  }
-\cs_new:Npn \token_get_arg_spec:N #1
-  {
-    \token_if_macro:NTF #1
-      {
-        \exp_after:wN \@@_get_prefix_arg_replacement:wN
-          \token_to_meaning:N #1 \q_stop \use_ii:nnn
-      }
-      { \scan_stop: }
-  }
-\cs_new:Npn \token_get_replacement_spec:N #1
-  {
-    \token_if_macro:NTF #1
-      {
-        \exp_after:wN \@@_get_prefix_arg_replacement:wN
-          \token_to_meaning:N #1 \q_stop \use_iii:nnn
-      }
-      { \scan_stop: }
-  }
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \cs_prefix_spec:N }
+\cs_new:Npn \token_get_prefix_spec:N { \cs_prefix_spec:N }
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \cs_argument_spec:N }
+\cs_new:Npn \token_get_arg_spec:N { \cs_argument_spec:N }
+\__kernel_patch_deprecation:nnNNpn { 2020-12-31 } { \cs_replacement_spec:N }
+\cs_new:Npn \token_get_replacement_spec:N { \cs_replacement_spec:N }
 %    \end{macrocode}
 % \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
 %
 %    \begin{macrocode}
 %</initex|package>
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 2c29c58..99db0ec 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -129,6 +129,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2289,7 +2293,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index aabdd07..333d54f 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -128,6 +128,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2585,7 +2589,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index c160952..a58b46a 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -128,6 +128,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2585,7 +2589,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index ba4902e..9f1e49e 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -128,6 +128,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2585,7 +2589,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 97296c0..7ffa5e3 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -128,6 +128,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2330,7 +2334,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 2c29c58..99db0ec 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -129,6 +129,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2289,7 +2293,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index aabdd07..333d54f 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -128,6 +128,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2585,7 +2589,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index c160952..a58b46a 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -128,6 +128,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2585,7 +2589,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index ba4902e..9f1e49e 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -128,6 +128,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2585,7 +2589,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 97296c0..7ffa5e3 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -128,6 +128,10 @@ Defining \cs_show:c on line ...
 Defining \cs_log:N on line ...
 Defining \cs_log:c on line ...
 Defining \__kernel_show:NN on line ...
+Defining \__kernel_prefix_arg_replacement:wN on line ...
+Defining \cs_prefix_spec:N on line ...
+Defining \cs_argument_spec:N on line ...
+Defining \cs_replacement_spec:N on line ...
 Defining \prg_do_nothing: on line ...
 Defining \prg_break_point:Nn on line ...
 Defining \prg_map_break:Nn on line ...
@@ -2330,7 +2334,6 @@ Defining \peek_meaning_ignore_spaces:NF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NTF on line ...
 Defining \peek_meaning_remove_ignore_spaces:NT on line ...
 Defining \peek_meaning_remove_ignore_spaces:NF on line ...
-Defining \__peek_get_prefix_arg_replacement:wN on line ...
 Defining \token_get_prefix_spec:N on line ...
 Defining \token_get_arg_spec:N on line ...
 Defining \token_get_replacement_spec:N on line ...
diff --git a/l3kernel/testfiles/m3token002.luatex.tlg b/l3kernel/testfiles/m3token002.luatex.tlg
index dbf6d4e..1f2037a 100644
--- a/l3kernel/testfiles/m3token002.luatex.tlg
+++ b/l3kernel/testfiles/m3token002.luatex.tlg
@@ -328,7 +328,7 @@ TRUE
 TRUE
 ============================================================
 ============================================================
-TEST 29: token_get_ _spec
+TEST 29: cs_ _spec
 ============================================================
 #1<
 #2->#1###2
diff --git a/l3kernel/testfiles/m3token002.lvt b/l3kernel/testfiles/m3token002.lvt
index 34ed963..699b1ec 100644
--- a/l3kernel/testfiles/m3token002.lvt
+++ b/l3kernel/testfiles/m3token002.lvt
@@ -1,5 +1,5 @@
 %
-% Copyright (C) 2009-2012,2014,2015,2017,2018 The LaTeX Project
+% Copyright (C) 2009-2012,2014,2015,2017-2019 The LaTeX Project
 %
 
 \documentclass{minimal}
@@ -339,13 +339,13 @@
 
 \cs_set_nopar:Npn \tmpA #1 <-> #2 { #1 ## #2 }
 \cs_set_protected:Npn \tmpB #1 / #2 { #1 ## #2 }
-\TESTEXP{token_get_~_spec}{
-  \token_get_prefix_spec:N      \tmpA \NEWLINE
-  \token_get_arg_spec:N         \tmpA \NEWLINE
-  \token_get_replacement_spec:N \tmpA \NEWLINE \NEWLINE
-  \token_get_prefix_spec:N      \tmpB \NEWLINE
-  \token_get_arg_spec:N         \tmpB \NEWLINE
-  \token_get_replacement_spec:N \tmpB \NEWLINE
+\TESTEXP{cs_~_spec}{
+  \cs_prefix_spec:N      \tmpA \NEWLINE
+  \cs_argument_spec:N         \tmpA \NEWLINE
+  \cs_replacement_spec:N \tmpA \NEWLINE \NEWLINE
+  \cs_prefix_spec:N      \tmpB \NEWLINE
+  \cs_argument_spec:N         \tmpB \NEWLINE
+  \cs_replacement_spec:N \tmpB \NEWLINE
 }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/l3kernel/testfiles/m3token002.tlg b/l3kernel/testfiles/m3token002.tlg
index 149dacd..2440e5b 100644
--- a/l3kernel/testfiles/m3token002.tlg
+++ b/l3kernel/testfiles/m3token002.tlg
@@ -328,7 +328,7 @@ TRUE
 TRUE
 ============================================================
 ============================================================
-TEST 29: token_get_ _spec
+TEST 29: cs_ _spec
 ============================================================
 #1<
 #2->#1###2
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index dff584a..8deffce 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -4082,10 +4082,10 @@
   {
     \exp_args:Nf \str_case_e:nnTF
       {
-        \exp_args:Nf \tl_if_empty:nT { \token_get_arg_spec:N #1 }
+        \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
           {
             \exp_last_unbraced:Nf \@@_cmd_if_xparse_aux:w
-              { \token_get_replacement_spec:N #1 } ~ \q_stop
+              { \cs_replacement_spec:N #1 } ~ \q_stop
           }
       }
       {
diff --git a/l3trial/l3check/l3check.dtx b/l3trial/l3check/l3check.dtx
index c20cc2e..c2e756d 100644
--- a/l3trial/l3check/l3check.dtx
+++ b/l3trial/l3check/l3check.dtx
@@ -452,8 +452,8 @@
   {
     \tl_if_empty:fTF
       {
-        \token_get_prefix_spec:N #1
-        \token_get_arg_spec:N #1
+        \cs_prefix_spec:N #1
+        \cs_argument_spec:N #1
       }
       { \prg_return_true: }
       { \prg_return_false: }
@@ -610,7 +610,7 @@
     \token_if_macro:NTF #1
       {
         \tl_if_in:ffTF
-          { \token_get_prefix_spec:N #1 }
+          { \cs_prefix_spec:N #1 }
           { \tl_to_str:n { protected } }
           { \@@_old_exp_args:Nc \@@_patch:NoNnnn }
           { \@@_old_exp_args:Nc \@@_patch_exp:NoNnnn }
@@ -664,7 +664,7 @@
     \token_if_macro:NTF #1
       {
         \tl_if_in:ffTF
-          { \token_get_prefix_spec:N #1 }
+          { \cs_prefix_spec:N #1 }
           { \tl_to_str:n { protected } }
           { \@@_patch_aux:NNn \check_is_N:n #1 }
           { \@@_patch_aux:NNn \check_is_N_exp:n #1 }
@@ -1803,14 +1803,12 @@
 %
 % \subsubsection{\pkg{l3token}}
 %
-% ^^A todo: the internal \__peek_get_prefix_arg_replacement:wN is misnamed: __peek should be __token
-%
 % |\char_set_catcode_(escape/group_begin/group_end/math_toggle/alignment/end_line/parameter/math_superscript/math_subscript/ignore/space/letter/other/active/comment/invalid):N|,
 % |\token_if_(group_begin/group_end/math_toggle/alignment/parameter/math_superscript/math_subscript/space/letter/other/active/macro/cs/expandable/primitive/chardef/mathchardef/(dim/int/muskip/skip/toks)_register/(protected/long/protected_long)_macro):N|(TF),
 % |\peek_(catcode/charcode/meaning)(/_remove)(/_ignore_spaces):N|(TF),
 % |\token_new:Nn|, |\token_if_eq_(meaning/catcode/charcode):NN|(TF),
 % |\peek_(g/)after:Nw|,
-% |\token_get_(prefix/arg/replacement)_spec:N|,
+% |\cs_(prefix/argument/replacement)_spec:N|,
 % |\char_(g/)set_active:Np(n/x)|, |\char_(g/)set_active_eq:NN|,
 %
 % \subsubsection{\pkg{l3prop}}





More information about the latex3-commits mailing list