summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3clist.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3clist.sty28
1 files changed, 21 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty b/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty
index 3dd557d6b8a..611599be6bd 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3clist.sty
@@ -47,7 +47,7 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3clist.dtx 3029 2011-12-06 22:47:30Z joseph $
+\GetIdInfo$Id: l3clist.dtx 3086 2011-12-22 17:55:46Z bruno $
{L3 Experimental comma separated lists}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -76,7 +76,7 @@
{ \clist_concat_aux:NNNN \tl_set:Nx }
\cs_new_protected_nopar:Npn \clist_gconcat:NNN
{ \clist_concat_aux:NNNN \tl_gset:Nx }
-\cs_new_protected_nopar:Npn \clist_concat_aux:NNNN #1#2#3#4
+\cs_new_protected:Npn \clist_concat_aux:NNNN #1#2#3#4
{
#1 #2
{
@@ -147,7 +147,7 @@
\cs_generate_variant:Nn \clist_put_left:Nn { c , cV , co , cx }
\cs_generate_variant:Nn \clist_gput_left:Nn { NV , No , Nx }
\cs_generate_variant:Nn \clist_gput_left:Nn { c , cV , co , cx }
-\cs_new_protected:Npn \clist_put_right:Nn
+\cs_new_protected_nopar:Npn \clist_put_right:Nn
{ \clist_put_right_aux:NNNn \clist_concat:NNN \clist_set:Nn }
\cs_new_protected_nopar:Npn \clist_gput_right:Nn
{ \clist_put_right_aux:NNNn \clist_gconcat:NNN \clist_gset:Nn }
@@ -160,7 +160,7 @@
\cs_generate_variant:Nn \clist_put_right:Nn { c , cV , co , cx }
\cs_generate_variant:Nn \clist_gput_right:Nn { NV , No , Nx }
\cs_generate_variant:Nn \clist_gput_right:Nn { c , cV , co , cx }
-\cs_new_protected_nopar:Npn \clist_get:NN #1#2
+\cs_new_protected:Npn \clist_get:NN #1#2
{ \exp_after:wN \clist_get_aux:wN #1 , \q_stop #2 }
\cs_new_protected:Npn \clist_get_aux:wN #1 , #2 \q_stop #3
{ \tl_set:Nn #3 {#1} }
@@ -169,7 +169,7 @@
{ \clist_pop_aux:NNN \tl_set:Nf }
\cs_new_protected_nopar:Npn \clist_gpop:NN
{ \clist_pop_aux:NNN \tl_gset:Nf }
-\cs_new_protected_nopar:Npn \clist_pop_aux:NNN #1#2#3
+\cs_new_protected:Npn \clist_pop_aux:NNN #1#2#3
{
\exp_after:wN \clist_pop_aux:wNNN #2 , \q_nil \q_stop #1#2#3
}
@@ -281,7 +281,7 @@
\cs_generate_variant:Nn \clist_if_in:nnT { nV , no }
\cs_generate_variant:Nn \clist_if_in:nnF { nV , no }
\cs_generate_variant:Nn \clist_if_in:nnTF { nV , no }
-\cs_new_nopar:Npn \clist_map_function:NN #1#2
+\cs_new:Npn \clist_map_function:NN #1#2
{
\clist_if_empty:NF #1
{
@@ -355,7 +355,7 @@
\cs_generate_variant:Nn \clist_map_variable:NNn { c }
\cs_new_eq:NN \clist_map_break: \prg_map_break:
\cs_new_eq:NN \clist_map_break:n \prg_map_break:n
-\cs_new_protected_nopar:Npn \clist_show:N #1
+\cs_new_protected:Npn \clist_show:N #1
{
\msg_aux_show:Nnx
#1
@@ -488,6 +488,20 @@
\cs_new_protected:Npn \clist_const:Nn #1#2
{ \tl_const:Nx #1 { \clist_trim_spaces:n {#2} } }
\cs_generate_variant:Nn \clist_const:Nn { c , Nx , cx }
+\prg_new_conditional:Npnn \clist_if_empty:n #1 { p , T , F , TF }
+ {
+ \clist_if_empty_n_aux:w ? #1
+ , \q_mark \prg_return_false:
+ , \q_mark \prg_return_true:
+ \q_stop
+ }
+\cs_new:Npn \clist_if_empty_n_aux:w #1 ,
+ {
+ \tl_if_empty:oTF { \use_none:nn #1 ? }
+ { \clist_if_empty_n_aux:w ? }
+ { \clist_if_empty_n_aux:wNw }
+ }
+\cs_new:Npn \clist_if_empty_n_aux:wNw #1 \q_mark #2#3 \q_stop {#2}
\cs_new_protected:Npn \clist_trim_spaces:N #1 { \clist_set:No #1 {#1} }
\cs_new_protected:Npn \clist_gtrim_spaces:N #1 { \clist_gset:No #1 {#1} }
\cs_generate_variant:Nn \clist_trim_spaces:N { c }