[latex3-commits] [latex3/latex3] conditional-forms: Add \prg_generate_conditional_variant:Nn (32a0fcf5f)
github at latex-project.org
github at latex-project.org
Thu Nov 21 19:36:33 CET 2024
Repository : https://github.com/latex3/latex3
On branch : conditional-forms
Link : https://github.com/latex3/latex3/commit/32a0fcf5f60dc8ad55be811bd939c2a338ee0530
>---------------------------------------------------------------
commit 32a0fcf5f60dc8ad55be811bd939c2a338ee0530
Author: Joseph Wright <joseph at texdev.net>
Date: Thu Nov 21 18:35:50 2024 +0000
Add \prg_generate_conditional_variant:Nn
>---------------------------------------------------------------
32a0fcf5f60dc8ad55be811bd939c2a338ee0530
l3kernel/CHANGELOG.md | 1 +
l3kernel/l3box.dtx | 9 +++------
l3kernel/l3clist.dtx | 12 +++++-------
l3kernel/l3coffins.dtx | 3 +--
l3kernel/l3deprecation.dtx | 3 +--
l3kernel/l3doc.dtx | 5 ++---
l3kernel/l3expan.dtx | 11 +++++++----
l3kernel/l3file.dtx | 28 +++++++++++-----------------
l3kernel/l3flag.dtx | 3 +--
l3kernel/l3keys.dtx | 2 +-
l3kernel/l3prg.dtx | 15 ++++++++++++++-
l3kernel/l3prop.dtx | 26 ++++++++++++--------------
l3kernel/l3quark.dtx | 6 ++----
l3kernel/l3regex.dtx | 8 ++++----
l3kernel/l3seq.dtx | 29 +++++++++++------------------
l3kernel/l3str.dtx | 15 ++++++---------
l3kernel/l3tl.dtx | 38 ++++++++++++++++----------------------
17 files changed, 98 insertions(+), 116 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 36c8631db..a5182c5dd 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -10,6 +10,7 @@ this project uses date-based 'snapshot' version identifiers.
### Added
- `\bitset_use:N` and `\clist_use:N`: this clarifies that bitsets and clists
can be used with `V`-type expansion
+- `\prg_generate_conditional_conditional:Nn`
- `\prg_(new|set|gset)_eq_conditional:NN`
- `\sys_if_engine_opentype:(TF)`
diff --git a/l3kernel/l3box.dtx b/l3kernel/l3box.dtx
index a06f28212..9e7e59831 100644
--- a/l3kernel/l3box.dtx
+++ b/l3kernel/l3box.dtx
@@ -1249,10 +1249,8 @@
{ \if_hbox:N #1 \prg_return_true: \else: \prg_return_false: \fi: }
\prg_new_conditional:Npnn \box_if_vertical:N #1 { p , T , F , TF }
{ \if_vbox:N #1 \prg_return_true: \else: \prg_return_false: \fi: }
-\prg_generate_conditional_variant:Nnn \box_if_horizontal:N
- { c } { p , T , F , TF }
-\prg_generate_conditional_variant:Nnn \box_if_vertical:N
- { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \box_if_horizontal:N { c }
+\prg_generate_conditional_variant:Nn \box_if_vertical:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1263,8 +1261,7 @@
% \begin{macrocode}
\prg_new_conditional:Npnn \box_if_empty:N #1 { p , T , F , TF }
{ \if_box_empty:N #1 \prg_return_true: \else: \prg_return_false: \fi: }
-\prg_generate_conditional_variant:Nnn \box_if_empty:N
- { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \box_if_empty:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/l3kernel/l3clist.dtx b/l3kernel/l3clist.dtx
index 478b5d8c3..5ad948862 100644
--- a/l3kernel/l3clist.dtx
+++ b/l3kernel/l3clist.dtx
@@ -1355,7 +1355,7 @@
\prg_return_true:
\fi:
}
-\prg_generate_conditional_variant:Nnn \clist_get:NN { c } { T , F , TF }
+\prg_generate_conditional_variant:Nn \clist_get:NN { c }
\prg_new_protected_conditional:Npnn \clist_pop:NN #1#2 { T , F , TF }
{ \@@_pop_TF:NNN \__kernel_tl_set:Nx #1 #2 }
\prg_new_protected_conditional:Npnn \clist_gpop:NN #1#2 { T , F , TF }
@@ -1369,8 +1369,8 @@
\prg_return_true:
\fi:
}
-\prg_generate_conditional_variant:Nnn \clist_pop:NN { c } { T , F , TF }
-\prg_generate_conditional_variant:Nnn \clist_gpop:NN { c } { T , F , TF }
+\prg_generate_conditional_variant:Nn \clist_pop:NN { c }
+\prg_generate_conditional_variant:Nn \clist_gpop:NN { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1686,10 +1686,8 @@
{ \prg_return_false: } { \prg_return_true: }
}
}
-\prg_generate_conditional_variant:Nnn \clist_if_in:Nn
- { NV , No , c , cV , co } { T , F , TF }
-\prg_generate_conditional_variant:Nnn \clist_if_in:nn
- { nV , no } { T , F , TF }
+\prg_generate_conditional_variant:Nn \clist_if_in:Nn { NV , No , c , cV , co }
+\prg_generate_conditional_variant:Nn \clist_if_in:nn { nV , no }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/l3kernel/l3coffins.dtx b/l3kernel/l3coffins.dtx
index 7eda18d6e..0111c4455 100644
--- a/l3kernel/l3coffins.dtx
+++ b/l3kernel/l3coffins.dtx
@@ -595,8 +595,7 @@
}
{ \prg_return_false: }
}
-\prg_generate_conditional_variant:Nnn \coffin_if_exist:N
- { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \coffin_if_exist:N { c }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/l3deprecation.dtx b/l3kernel/l3deprecation.dtx
index 87c7708eb..9ddd8a328 100644
--- a/l3kernel/l3deprecation.dtx
+++ b/l3kernel/l3deprecation.dtx
@@ -523,8 +523,7 @@
\__kernel_patch_deprecation:nnNNpn { 2022-05-23 } { \token_case_meaning:NnTF }
\cs_new:Npn \tl_case:NnTF { \token_case_meaning:NnTF }
\cs_generate_variant:Nn \tl_case:Nn { c }
-\prg_generate_conditional_variant:Nnn \tl_case:Nn
- { c } { T , F , TF }
+\prg_generate_conditional_variant:Nn \tl_case:Nn { c }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 1c79a4998..31bf415a4 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -1043,7 +1043,7 @@ and all files in that bundle must be distributed together.
{ \prg_return_false: }
{ \prg_return_true: }
}
-\prg_generate_conditional_variant:Nnn \@@_if_almost_str:n { V } { T }
+\prg_generate_conditional_variant:Nn \@@_if_almost_str:n { V }
% \end{macrocode}
% \end{macro}
%
@@ -1071,8 +1071,7 @@ and all files in that bundle must be distributed together.
{ \prg_return_true: }
{ \prg_return_false: }
}
-\prg_generate_conditional_variant:Nnn \@@_str_if_begin:nn
- { oo } { TF , T , F }
+\prg_generate_conditional_variant:Nn \@@_str_if_begin:nn { oo }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/l3expan.dtx b/l3kernel/l3expan.dtx
index b0b8ca1e3..b1ac22e16 100644
--- a/l3kernel/l3expan.dtx
+++ b/l3kernel/l3expan.dtx
@@ -2195,8 +2195,9 @@
%
% \begin{macro}
% {
+% \prg_generate_conditional_variant:Nn,
% \prg_generate_conditional_variant:Nnn,
-% \@@_generate_variant:nnNnn,
+% \@@_generate_variant:nnNn,
% \@@_generate_variant:nnnNn,
% \@@_generate_variant:w,
% \@@_generate_variant:n,
@@ -2206,15 +2207,17 @@
% \@@_generate_variant_TF_form:nnn,
% }
% \begin{macrocode}
-\cs_new_protected:Npn \prg_generate_conditional_variant:Nnn #1
+\cs_new_protected:Npn \prg_generate_conditional_variant:Nn #1
{
\use:e
{
- \@@_generate_variant:nnNnn
+ \@@_generate_variant:nnNn
\cs_split_function:N #1
}
}
-\cs_new_protected:Npn \@@_generate_variant:nnNnn #1#2#3#4#5
+\cs_new_protected:Npn \prg_generate_conditional_variant:Nnn #1#2#3
+ { \prg_generate_conditional_variant:Nn #1 {#2} }
+\cs_new_protected:Npn \@@_generate_variant:nnNn #1#2#3#4
{
\cs_if_exist:cTF { #1 _p : #2 }
{ \@@_generate_variant:nnnNn { T , F , TF , p } }
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index ceadf34dc..63ec93b61 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -1163,7 +1163,7 @@
}
{ \prg_return_false: }
}
-\prg_generate_conditional_variant:Nnn \ior_open:Nn { c } { T , F , TF }
+\prg_generate_conditional_variant:Nn \ior_open:Nn { c }
% \end{macrocode}
% \end{macro}
%
@@ -2909,7 +2909,7 @@
}
{ \prg_return_false: }
}
-\prg_generate_conditional_variant:Nnn \file_get:nnN { V } { T , F , TF }
+\prg_generate_conditional_variant:Nn \file_get:nnN { V }
\cs_new_protected:Npe \@@_get_aux:nnN #1#2#3
{
\exp_not:N \if_false: { \exp_not:N \fi:
@@ -3141,8 +3141,7 @@
{ \prg_return_false: }
{ \prg_return_true: }
}
-\prg_generate_conditional_variant:Nnn \file_get_full_name:nN
- { V } { T , F , TF }
+\prg_generate_conditional_variant:Nn \file_get_full_name:nN { V }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3299,20 +3298,16 @@
\cs_generate_variant:Nn \file_get_timestamp:nN { V }
\prg_new_protected_conditional:Npnn \file_get_hex_dump:nN #1#2 { T , F , TF }
{ \@@_get_details:nnN {#1} { hex_dump } #2 }
-\prg_generate_conditional_variant:Nnn \file_get_hex_dump:nN
- { V } { T , F , TF }
+\prg_generate_conditional_variant:Nn \file_get_hex_dump:nN { V }
\prg_new_protected_conditional:Npnn \file_get_mdfive_hash:nN #1#2 { T , F , TF }
{ \@@_get_details:nnN {#1} { mdfive_hash } #2 }
-\prg_generate_conditional_variant:Nnn \file_get_mdfive_hash:nN
- { V } { T , F , TF }
+\prg_generate_conditional_variant:Nn \file_get_mdfive_hash:nN { V }
\prg_new_protected_conditional:Npnn \file_get_size:nN #1#2 { T , F , TF }
{ \@@_get_details:nnN {#1} { size } #2 }
-\prg_generate_conditional_variant:Nnn \file_get_size:nN
- { V } { T , F , TF }
+\prg_generate_conditional_variant:Nn \file_get_size:nN { V }
\prg_new_protected_conditional:Npnn \file_get_timestamp:nN #1#2 { T , F , TF }
{ \@@_get_details:nnN {#1} { timestamp } #2 }
-\prg_generate_conditional_variant:Nnn \file_get_timestamp:nN
- { V } { T , F , TF }
+\prg_generate_conditional_variant:Nn \file_get_timestamp:nN { V }
\cs_new_protected:Npn \@@_get_details:nnN #1#2#3
{
\__kernel_tl_set:Nx #3
@@ -3343,8 +3338,7 @@
{ \prg_return_false: }
{ \prg_return_true: }
}
-\prg_generate_conditional_variant:Nnn \file_get_hex_dump:nnnN
- { V } { T , F , TF }
+\prg_generate_conditional_variant:Nn \file_get_hex_dump:nnnN { V }
% \end{macrocode}
% \end{macro}
%
@@ -3376,8 +3370,8 @@
{ \file_full_name:n {#3} }
#2
}
-\prg_generate_conditional_variant:Nnn \file_compare_timestamp:nNn
- { nNV , V , VNV } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \file_compare_timestamp:nNn
+ { nNV , V , VNV }
\cs_new:Npn \@@_compare_timestamp:nnN #1#2#3
{
\tl_if_blank:nTF {#1}
@@ -3428,7 +3422,7 @@
{ \prg_return_false: }
{ \prg_return_true: }
}
-\prg_generate_conditional_variant:Nnn \file_if_exist:n { V } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \file_if_exist:n { V }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/l3flag.dtx b/l3kernel/l3flag.dtx
index b6a60f550..e5decd9e5 100644
--- a/l3kernel/l3flag.dtx
+++ b/l3kernel/l3flag.dtx
@@ -291,8 +291,7 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \flag_if_raised:N
- { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \flag_if_raised:N { c }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/l3keys.dtx b/l3kernel/l3keys.dtx
index c9220d727..221c5bfba 100644
--- a/l3kernel/l3keys.dtx
+++ b/l3kernel/l3keys.dtx
@@ -3531,7 +3531,7 @@
{ \prg_return_true: }
{ \prg_return_false: }
}
-\prg_generate_conditional_variant:Nnn \keys_if_exist:nn { ne } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \keys_if_exist:nn { ne }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/l3prg.dtx b/l3kernel/l3prg.dtx
index 09245d404..9dd6f5b57 100644
--- a/l3kernel/l3prg.dtx
+++ b/l3kernel/l3prg.dtx
@@ -222,6 +222,19 @@
% the expansion of the conditional code. This includes other instances of either of these functions.
% \end{function}
%
+% \begin{function}[added = 2024-11-21]{\prg_generate_conditional_variant:Nn}
+% \begin{syntax}
+% \cs{prg_generate_conditional_variant:Nnn} \cs[no-index]{\meta{name}:\meta{arg spec}} \Arg{variant argument specifiers}
+% \end{syntax}
+% Defines argument-specifier variants of conditionals. This is
+% equivalent to running \cs{cs_generate_variant:Nn} \meta{conditional}
+% \Arg{variant argument specifiers} on each \meta{conditional}:
+% |T|, |F|, |TF| and if appropriate |p|. These base-form
+% \meta{conditionals} are obtained from the \meta{name} and \meta{arg
+% spec} as described for \cs{prg_new_conditional:Npnn}, and they
+% should be defined.
+% \end{function}
+%
% \begin{function}[added = 2024-11-20]{\prg_generate_conditional_variant:Nnn}
% \begin{syntax}
% \cs{prg_generate_conditional_variant:Nnn} \cs[no-index]{\meta{name}:\meta{arg spec}} \Arg{variant argument specifiers} \Arg{condition specifiers}
@@ -1060,7 +1073,7 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \bool_if:N { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \bool_if:N { c }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/l3prop.dtx b/l3kernel/l3prop.dtx
index 6b04dfc32..dfbea1b2c 100644
--- a/l3kernel/l3prop.dtx
+++ b/l3kernel/l3prop.dtx
@@ -1653,12 +1653,11 @@
\@@_get:NnnTF #1 {#2}
{ \tl_set:Nn #3 } \prg_return_true: \prg_return_false:
}
-\prg_generate_conditional_variant:Nnn \prop_get:NnN
- { NV , Nv , Ne , c , cV , cv , ce } { T , F , TF }
-\prg_generate_conditional_variant:Nnn \prop_get:NnN
- { No , Nx , co , cx } { T , F , TF }
-\prg_generate_conditional_variant:Nnn \prop_get:NnN
- { cnc } { T , F , TF }
+\prg_generate_conditional_variant:Nn \prop_get:NnN
+ { NV , Nv , Ne , c , cV , cv , ce }
+\prg_generate_conditional_variant:Nn \prop_get:NnN
+ { No , Nx , co , cx }
+\prg_generate_conditional_variant:Nn \prop_get:NnN { cnc }
\cs_new_protected:Npn \@@_get:NnnTF #1#2#3#4#5
{
\@@_split:NnTFn #1 {#2}
@@ -1910,10 +1909,10 @@
\cs_gset_eq:NN \cs_gset_nopar:Npe
{ \tl_set:Nn #3 } \prg_return_true: \prg_return_false:
}
-\prg_generate_conditional_variant:Nnn \prop_pop:NnN
- { NV , No , c , cV , co } { T , F , TF }
-\prg_generate_conditional_variant:Nnn \prop_gpop:NnN
- { NV , No , c , cV , co } { T , F , TF }
+\prg_generate_conditional_variant:Nn \prop_pop:NnN
+ { NV , No , c , cV , co }
+\prg_generate_conditional_variant:Nn \prop_gpop:NnN
+ { NV , No , c , cV , co }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2177,8 +2176,7 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \prop_if_empty:N
- { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \prop_if_empty:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2229,8 +2227,8 @@
\str_if_eq:eeT {#1} {#2}
{ \prop_map_break:n { \use_i:nn \prg_return_true: } }
}
-\prg_generate_conditional_variant:Nnn \prop_if_in:Nn
- { NV , Ne , No , c , cV , ce , co } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \prop_if_in:Nn
+ { NV , Ne , No , c , cV , ce , co }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/l3kernel/l3quark.dtx b/l3kernel/l3quark.dtx
index 5c6b0ca2d..24a1c767f 100644
--- a/l3kernel/l3quark.dtx
+++ b/l3kernel/l3quark.dtx
@@ -527,8 +527,7 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \quark_if_no_value:N
- { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \quark_if_no_value:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -576,8 +575,7 @@
\fi:
}
\cs_new:Npn \@@_if_no_value:w #1 \q_no_value #2 ? #3 ? ! { #1 #2 }
-\prg_generate_conditional_variant:Nnn \quark_if_nil:n
- { V , o } { p , TF , T , F }
+\prg_generate_conditional_variant:Nn \quark_if_nil:n { V , o }
\cs_new:Npn \@@_if_empty_if:o #1
{
\exp_after:wN \if_meaning:w \exp_after:wN \q_nil
diff --git a/l3kernel/l3regex.dtx b/l3kernel/l3regex.dtx
index 1fa9f71f0..945eb22a8 100644
--- a/l3kernel/l3regex.dtx
+++ b/l3kernel/l3regex.dtx
@@ -6551,13 +6551,13 @@
\@@_if_match:nn { \@@_build:n {#1} } {#2}
\@@_return:
}
-\prg_generate_conditional_variant:Nnn \regex_match:nn { nV } { T , F , TF }
+\prg_generate_conditional_variant:Nn \regex_match:nn { nV }
\prg_new_protected_conditional:Npnn \regex_match:Nn #1#2 { T , F , TF }
{
\@@_if_match:nn { \@@_build:N #1 } {#2}
\@@_return:
}
-\prg_generate_conditional_variant:Nnn \regex_match:Nn { NV } { T , F , TF }
+\prg_generate_conditional_variant:Nn \regex_match:Nn { NV }
% \end{macrocode}
% \end{macro}
%
@@ -6627,9 +6627,9 @@
\prg_new_protected_conditional:Npnn #3 ##1##2##3 { T , F , TF }
{ #1 { \@@_build:N ##1 } {##2} ##3 \@@_return: }
\cs_generate_variant:Nn #2 { nV }
- \prg_generate_conditional_variant:Nnn #2 { nV } { T , F , TF }
+ \prg_generate_conditional_variant:Nn #2 { nV }
\cs_generate_variant:Nn #3 { NV }
- \prg_generate_conditional_variant:Nnn #3 { NV } { T , F , TF }
+ \prg_generate_conditional_variant:Nn #3 { NV }
}
\@@_tmp:w \@@_extract_once:nnN
\regex_extract_once:nnN \regex_extract_once:NnN
diff --git a/l3kernel/l3seq.dtx b/l3kernel/l3seq.dtx
index 90c107560..31cfe90da 100644
--- a/l3kernel/l3seq.dtx
+++ b/l3kernel/l3seq.dtx
@@ -1645,8 +1645,8 @@
{ \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_set:Nx \use_ii:nn }
\prg_new_protected_conditional:Npnn \seq_gset_item:Nnn #1#2#3 { TF , T , F }
{ \@@_set_item:NnnNN #1 {#2} {#3} \__kernel_tl_gset:Nx \use_ii:nn }
-\prg_generate_conditional_variant:Nnn \seq_set_item:Nnn { c } { TF , T , F }
-\prg_generate_conditional_variant:Nnn \seq_gset_item:Nnn { c } { TF , T , F }
+\prg_generate_conditional_variant:Nn \seq_set_item:Nnn { c }
+\prg_generate_conditional_variant:Nn \seq_gset_item:Nnn { c }
% \end{macrocode}
% Save the item to be stored and evaluate the position and the sequence
% length only once. Then depending on the sign of the position, check
@@ -1806,8 +1806,7 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \seq_if_empty:N
- { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \seq_if_empty:N { c }
% \end{macrocode}
% \end{macro}
%
@@ -1906,8 +1905,8 @@
}
\cs_new:Npn \@@_if_in:
{ \prg_break:n { \group_end: \prg_return_true: } }
-\prg_generate_conditional_variant:Nnn \seq_if_in:Nn
- { NV , Nv , Ne , No , Nx , c , cV , cv , ce , co , cx } { T , F , TF }
+\prg_generate_conditional_variant:Nn \seq_if_in:Nn
+ { NV , Nv , Ne , No , Nx , c , cV , cv , ce , co , cx }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2082,10 +2081,8 @@
{ \@@_pop_TF:NNNN \prg_do_nothing: \seq_get_left:NN #1#2 }
\prg_new_protected_conditional:Npnn \seq_get_right:NN #1#2 { T , F , TF }
{ \@@_pop_TF:NNNN \prg_do_nothing: \seq_get_right:NN #1#2 }
-\prg_generate_conditional_variant:Nnn \seq_get_left:NN
- { c } { T , F , TF }
-\prg_generate_conditional_variant:Nnn \seq_get_right:NN
- { c } { T , F , TF }
+\prg_generate_conditional_variant:Nn \seq_get_left:NN { c }
+\prg_generate_conditional_variant:Nn \seq_get_right:NN { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2108,14 +2105,10 @@
\prg_new_protected_conditional:Npnn \seq_gpop_right:NN #1#2
{ T , F , TF }
{ \@@_pop_TF:NNNN \@@_pop_right:NNN \__kernel_tl_gset:Nx #1 #2 }
-\prg_generate_conditional_variant:Nnn \seq_pop_left:NN { c }
- { T , F , TF }
-\prg_generate_conditional_variant:Nnn \seq_gpop_left:NN { c }
- { T , F , TF }
-\prg_generate_conditional_variant:Nnn \seq_pop_right:NN { c }
- { T , F , TF }
-\prg_generate_conditional_variant:Nnn \seq_gpop_right:NN { c }
- { T , F , TF }
+\prg_generate_conditional_variant:Nn \seq_pop_left:NN { c }
+\prg_generate_conditional_variant:Nn \seq_gpop_left:NN { c }
+\prg_generate_conditional_variant:Nn \seq_pop_right:NN { c }
+\prg_generate_conditional_variant:Nn \seq_gpop_right:NN { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/l3kernel/l3str.dtx b/l3kernel/l3str.dtx
index d369fdde5..5cd37bd48 100644
--- a/l3kernel/l3str.dtx
+++ b/l3kernel/l3str.dtx
@@ -1198,8 +1198,8 @@
\if:w 0 \@@_if_eq:nn { \exp_not:n {#1} } { \exp_not:n {#2} }
\prg_return_true: \else: \prg_return_false: \fi:
}
-\prg_generate_conditional_variant:Nnn \str_if_eq:nn
- { V , v , o , nV , no , VV , nv } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \str_if_eq:nn
+ { V , v , o , nV , no , VV , nv }
\prg_new_conditional:Npnn \str_if_eq:ee #1#2 { p , T , F , TF }
{
\if:w 0 \@@_if_eq:nn {#1} {#2}
@@ -1218,8 +1218,7 @@
\if:w 0 \@@_if_eq:nn { \tl_to_str:N #1 } { \tl_to_str:N #2 }
\prg_return_true: \else: \prg_return_false: \fi:
}
-\prg_generate_conditional_variant:Nnn \str_if_eq:NN
- { c , Nc , cc } { T , F , TF , p }
+\prg_generate_conditional_variant:Nn \str_if_eq:NN { c , Nc , cc }
% \end{macrocode}
% \end{macro}
%
@@ -1235,8 +1234,7 @@
{ \tl_if_in:nnTF { \tl_to_str:N #1 } { \tl_to_str:n {#2} } }
{ \prg_return_true: } { \prg_return_false: }
}
-\prg_generate_conditional_variant:Nnn \str_if_in:Nn
- { c } { T , F , TF }
+\prg_generate_conditional_variant:Nn \str_if_in:Nn { c }
\prg_new_protected_conditional:Npnn \str_if_in:nn #1#2 { T , F , TF }
{
\use:e
@@ -1285,8 +1283,7 @@
\cs_new:Npn \@@_case:nnTF #1#2#3#4
{ \@@_case:nw {#1} #2 {#1} { } \s_@@_mark {#3} \s_@@_mark {#4} \s_@@_stop }
\cs_generate_variant:Nn \str_case:nn { V , o , e , nV , nv }
-\prg_generate_conditional_variant:Nnn \str_case:nn
- { V , o , e , nV , nv } { T , F , TF }
+\prg_generate_conditional_variant:Nn \str_case:nn { V , o , e , nV , nv }
\cs_new_eq:NN \str_case:Nn \str_case:Vn
\cs_new_eq:NN \str_case:NnT \str_case:VnT
\cs_new_eq:NN \str_case:NnF \str_case:VnF
@@ -1320,7 +1317,7 @@
\cs_new:Npn \@@_case_e:nnTF #1#2#3#4
{ \@@_case_e:nw {#1} #2 {#1} { } \s_@@_mark {#3} \s_@@_mark {#4} \s_@@_stop }
\cs_generate_variant:Nn \str_case_e:nn { e }
-\prg_generate_conditional_variant:Nnn \str_case_e:nn { e } { T , F , TF }
+\prg_generate_conditional_variant:Nn \str_case_e:nn { e }
\cs_new:Npn \@@_case_e:nw #1#2#3
{
\str_if_eq:eeTF {#1} {#2}
diff --git a/l3kernel/l3tl.dtx b/l3kernel/l3tl.dtx
index 1b8609297..84070844e 100644
--- a/l3kernel/l3tl.dtx
+++ b/l3kernel/l3tl.dtx
@@ -2311,8 +2311,7 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \tl_if_empty:N
- { c } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \tl_if_empty:N { c }
% \end{macrocode}
% \end{macro}
%
@@ -2333,8 +2332,7 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \tl_if_empty:n
- { V , e } { p , TF , T , F }
+\prg_generate_conditional_variant:Nn \tl_if_empty:n { V , e }
% \end{macrocode}
% \end{macro}
%
@@ -2388,8 +2386,7 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \tl_if_blank:n
- { e , V , o } { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \tl_if_blank:n { e , V , o }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2399,8 +2396,7 @@
% equal.
% \begin{macrocode}
\prg_new_eq_conditional:NN \tl_if_eq:NN \cs_if_eq:NN
-\prg_generate_conditional_variant:Nnn \tl_if_eq:NN
- { Nc , c , cc } { p , TF , T , F }
+\prg_generate_conditional_variant:Nn \tl_if_eq:NN { Nc , c , cc }
% \end{macrocode}
% \end{macro}
%
@@ -2427,7 +2423,7 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \tl_if_eq:Nn { c } { TF , T , F }
+\prg_generate_conditional_variant:Nn \tl_if_eq:Nn { c }
% \end{macrocode}
% \end{macro}
%
@@ -2452,9 +2448,8 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \tl_if_eq:nn
+\prg_generate_conditional_variant:Nn \tl_if_eq:nn
{ nV , ne , nx , V, e , ee , x , xx }
- { TF , T , F }
% \end{macrocode}
% \end{macro}
%
@@ -2469,8 +2464,7 @@
\cs_new_protected:Npn \tl_if_in:NnT { \exp_args:No \tl_if_in:nnT }
\cs_new_protected:Npn \tl_if_in:NnF { \exp_args:No \tl_if_in:nnF }
\cs_new_protected:Npn \tl_if_in:NnTF { \exp_args:No \tl_if_in:nnTF }
-\prg_generate_conditional_variant:Nnn \tl_if_in:Nn
- { NV , No , c , cV , co } { T , F , TF }
+\prg_generate_conditional_variant:Nn \tl_if_in:Nn { NV , No , c , cV , co }
% \end{macrocode}
% \end{macro}
%
@@ -2507,8 +2501,8 @@
{ \prg_return_false: } { \prg_return_true: }
\if_false: } \fi:
}
-\prg_generate_conditional_variant:Nnn \tl_if_in:nn
- { V , VV , o , oo , nV , no } { T , F , TF }
+\prg_generate_conditional_variant:Nn \tl_if_in:nn
+ { V , VV , o , oo , nV , no }
% \end{macrocode}
% \end{macro}
%
@@ -2548,7 +2542,7 @@
\cs_new:Npn \tl_if_single:NT { \exp_args:No \tl_if_single:nT }
\cs_new:Npn \tl_if_single:NF { \exp_args:No \tl_if_single:nF }
\cs_new:Npn \tl_if_single:NTF { \exp_args:No \tl_if_single:nTF }
-\prg_generate_conditional_variant:Nnn \tl_if_single:N {c} { p , T , F , TF }
+\prg_generate_conditional_variant:Nn \tl_if_single:N { c }
% \end{macrocode}
% \end{macro}
%
@@ -3098,8 +3092,8 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \tl_if_head_eq_charcode:nN
- { V , e , f } { p , TF , T , F }
+\prg_generate_conditional_variant:Nn \tl_if_head_eq_charcode:nN
+ { V , e , f }
% \end{macrocode}
% For \cs{tl_if_head_eq_catcode:nN}, again we detect special cases
% with a \cs{tl_if_head_is_N_type:n}. Then we need to test if the
@@ -3125,8 +3119,8 @@
\prg_return_false:
\fi:
}
-\prg_generate_conditional_variant:Nnn \tl_if_head_eq_catcode:nN
- { V , e , o } { p , TF , T , F }
+\prg_generate_conditional_variant:Nn \tl_if_head_eq_catcode:nN
+ { V , e , o }
% \end{macrocode}
% For \cs{tl_if_head_eq_meaning:nN}, again, detect special cases. In
% the normal case, use \cs{tl_head:w}, with no \cs{exp_not:N} this
@@ -3147,8 +3141,8 @@
\@@_if_head_eq_meaning_special:nN
{#1} #2
}
-\prg_generate_conditional_variant:Nnn \tl_if_head_eq_meaning:nN
- { V , e } { p , TF , T , F }
+\prg_generate_conditional_variant:Nn \tl_if_head_eq_meaning:nN
+ { V , e }
\cs_new:Npn \@@_if_head_eq_meaning_normal:nN #1 #2
{
\exp_after:wN \if_meaning:w
More information about the latex3-commits
mailing list.