[latex3-commits] [git/LaTeX3-latex3-latex3] master: Move \__cs_parm_from_arg_count:nnF to kernel-only (177323f)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Apr 10 09:28:39 CEST 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/177323f38f141bcbb57a70217888a24a64543660
>---------------------------------------------------------------
commit 177323f38f141bcbb57a70217888a24a64543660
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Apr 10 08:28:39 2018 +0100
Move \__cs_parm_from_arg_count:nnF to kernel-only
>---------------------------------------------------------------
177323f38f141bcbb57a70217888a24a64543660
l3kernel/l3basics.dtx | 8 ++++----
l3kernel/l3kernel-functions.dtx | 11 +++++++++++
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index e765732..9ab18d2 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -2180,7 +2180,7 @@
}
\cs_set_protected:Npn \@@_generate_conditional_count:nnNnnnn #1#2#3#4#5
{
- \__cs_parm_from_arg_count:nnF
+ \__kernel_cs_parm_from_arg_count:nnF
{ \@@_generate_conditional:nnNnnnnn {#1} {#2} #3 {#4} {#5} }
{ \tl_count:n {#2} }
{
@@ -2968,7 +2968,7 @@
%<@@=cs>
% \end{macrocode}
%
-% \begin{macro}{\@@_parm_from_arg_count:nnF}
+% \begin{macro}{\__kernel_cs_parm_from_arg_count:nnF}
% \begin{macro}{\@@_parm_from_arg_count_test:nnF}
% \LaTeX3 provides shorthands to define control sequences and
% conditionals with a simple parameter text, derived directly from the
@@ -2982,7 +2982,7 @@
% the functions use here are not defined yet, but will be defined
% before this function is called.
% \begin{macrocode}
-\cs_set_protected:Npn \@@_parm_from_arg_count:nnF #1#2
+\cs_set_protected:Npn \__kernel_cs_parm_from_arg_count:nnF #1#2
{
\exp_args:Nx \@@_parm_from_arg_count_test:nnF
{
@@ -3069,7 +3069,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \cs_generate_from_arg_count:NNnn #1#2#3#4
{
- \@@_parm_from_arg_count:nnF { \use:nnn #2 #1 } {#3}
+ \__kernel_cs_parm_from_arg_count:nnF { \use:nnn #2 #1 } {#3}
{
\__kernel_msg_error:nnxx { kernel } { bad-number-of-arguments }
{ \token_to_str:N #1 } { \int_eval:n {#3} }
diff --git a/l3kernel/l3kernel-functions.dtx b/l3kernel/l3kernel-functions.dtx
index 372494e..850e427 100644
--- a/l3kernel/l3kernel-functions.dtx
+++ b/l3kernel/l3kernel-functions.dtx
@@ -136,6 +136,17 @@
% \meta{scope} is |l| or~|g|.
% \end{function}
%
+% \begin{function}{\__kernel_cs_parm_from_arg_count:nnF}
+% \begin{syntax}
+% \cs{__kernel_cs_parm_from_arg_count:nnF} \Arg{follow-on} \Arg{args} \Arg{false code}
+% \end{syntax}
+% Evaluates the number of \meta{args} and leavs the \meta{follow-on} code
+% followed by a brace group containing the required number of primitive
+% parameter markers (|#1|, \emph{etc}.). If the number of \meta{args} is outside
+% the range $[0,9]$, the \meta{false code} is inserted \emph{instead} of
+% the \meta{follow-on}.
+% \end{function}
+%
% \begin{function}{\__kernel_debug:TF}
% \begin{syntax}
% \cs{__kernel_debug:TF} \Arg{true code} \Arg{false code}
More information about the latex3-commits
mailing list