From 19b673bcbee6071004a25ead706b82caf7f20a0e Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 27 Sep 2010 23:22:46 +0000
Subject: xpackages update

git-svn-id: svn://tug.org/texlive/trunk@19922 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/xpackages/xbase/xparse.sty           | 66 +++++++++++-----------
 1 file changed, 33 insertions(+), 33 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty')

diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty
index 2b3f8cd388b..5936b52059b 100644
--- a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty
+++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty
@@ -23,7 +23,7 @@
 %%                      David Carlisle
 %%                  (C) Copyright 2004-2008 Frank Mittelbach,
 %%                      LaTeX3 Project
-%%                  (C) Copyright 2009 LaTeX3 Project
+%%                  (C) Copyright 2009-2010 LaTeX3 Project
 %%
 %% It may be distributed and/or modified under the conditions of the
 %% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -57,7 +57,7 @@
 %% -----------------------------------------------------------------------
 %%
 \RequirePackage{l3names}
-\GetIdInfo$Id: xparse.dtx 1927 2010-05-23 11:00:21Z joseph $
+\GetIdInfo$Id: xparse.dtx 2037 2010-09-20 21:22:45Z joseph $
   {Generic document command parser}
 \ProvidesExplPackage
   {\filename}{\filedate}{\fileversion}{\filedescription}
@@ -82,7 +82,6 @@
 \tl_new:N \l_xparse_signature_tl
 \tl_new:N \l_xparse_tmp_tl
 \int_new:N \l_xparse_total_args_int
-\quark_new:N \q_xparse_stop
 \cs_new_nopar:Npn \xparse_add_grabber_mandatory:N #1 {
   \tl_put_right:Nx \l_xparse_signature_tl {
     \exp_not:c {
@@ -346,7 +345,7 @@
   \bool_set_false:N \l_xparse_m_only_bool
 }
 \prg_new_conditional:Nnn \xparse_if_no_value:n { TF,T,F } {
-  \tl_if_eq:nnTF {#1} { \NoValue } {
+  \str_if_eq:nnTF {#1} { \NoValue } {
     \prg_return_true:
   }{
     \prg_return_false:
@@ -468,23 +467,23 @@
 }
 \tl_new:N \_l_xparse_nesting_a_tl
 \tl_new:N \_l_xparse_nesting_b_tl
-\quark_new:N \_q_xparse
+\quark_new:N \q_xparse
 \cs_new_protected:Npn \xparse_grab_D_nested:NNNnn #1#2#3#4#5 {
   \tl_clear:N \_l_xparse_nesting_a_tl
   \tl_clear:N \_l_xparse_nesting_b_tl
-  #5 \xparse_grab_arg:w ##1 #1 ##2 \_q_xparse ##3 #2
+  #5 \xparse_grab_arg:w ##1 #1 ##2 \q_xparse ##3 #2
     {
       \tl_put_right:Nn \_l_xparse_nesting_a_tl { ##1 #1 }
       \tl_put_right:Nn \_l_xparse_nesting_b_tl { #2 ##3 }
       \tl_if_in:nnTF {##2} {#1}
-        { \xparse_grab_arg:w ##2 \_q_xparse }
+        { \xparse_grab_arg:w ##2 \q_xparse }
         {
           \tl_if_in:NnTF \_l_xparse_nesting_b_tl {#1}
             {
               \tl_set_eq:NN \l_xparse_tmp_tl \_l_xparse_nesting_b_tl
               \tl_clear:N \_l_xparse_nesting_b_tl
               \exp_last_unbraced:NV \xparse_grab_arg:w
-                \l_xparse_tmp_tl \_q_xparse
+                \l_xparse_tmp_tl \q_xparse
             }
             {
               \tl_put_right:Nn \_l_xparse_nesting_a_tl {##2}
@@ -495,7 +494,7 @@
           }
         }
     }
-  \xparse_grab_arg:w #3 \_q_xparse
+  \xparse_grab_arg:w #3 \q_xparse
 }
 \cs_new:Npn \xparse_grab_G:w #1#2 \l_xparse_args_tl {
   \xparse_grab_G_aux:nnNn {#1} {#2} \cs_set_nopar:Npn { _ignore_spaces }
@@ -673,10 +672,10 @@
           \tl_replace_all_in:Nnn \_l_xparse_split_argument_tl { @ } {#2}
         }
       \cs_set_protected:Npn \_xparse_split_argument_aux_i:w
-        ##1 \q_nil ##2 #2 ##3 \q_stop
+        ##1 \q_mark ##2 #2 ##3 \q_stop
         {
           \tl_put_right:Nn \ProcessedArgument { {##2} }
-          ##1 \q_nil ##3 \q_stop
+          ##1 \q_mark ##3 \q_stop
         }
       \cs_set_protected:Npn \_xparse_split_argument_aux_iii:w
         ##1 #2 ##2 \q_stop
@@ -692,7 +691,7 @@
           \prg_replicate:nn { #1 + 1 }
             { \_xparse_split_argument_aux_i:w }
           \_xparse_split_argument_aux_ii:w
-          \exp_not:N \q_nil
+          \exp_not:N \q_mark
           \exp_not:V \_l_xparse_split_argument_tl
           \prg_replicate:nn {#1} { \exp_not:n {#2} \NoValue }
           \exp_not:n { #2 \q_stop }
@@ -702,7 +701,7 @@
 \group_end:
 \cs_set_protected:Npn \_xparse_split_argument_aux_i:w { }
 \cs_set_protected:Npn \_xparse_split_argument_aux_ii:w
-  #1 \q_nil #2 \q_stop
+  #1 \q_mark #2 \q_stop
   {
     \tl_if_empty:nF {#2}
       { \_xparse_split_argument_aux_iii:w #2 \q_stop }
@@ -746,21 +745,20 @@
     \exp_after:wN \token_to_str:N \l_xparse_function_tl
     \int_use:N \l_xparse_total_args_int
   }
-  \xparse_exp_set:cpx { \l_xparse_tmp_tl } ##1 \q_xparse_stop ##2 {
+  \xparse_exp_set:cpx { \l_xparse_tmp_tl } ##1 \q_xparse ##2 {
     \exp_not:N \tl_if_head_eq_charcode:nNTF {##2} #1 {
       \exp_not:c { \l_xparse_tmp_tl aux }
-        ##1 \exp_not:N \q_xparse_stop
+        ##1 \exp_not:N \q_xparse
     }{
       \exp_not:c { \l_xparse_tmp_tl aux }
-        ##1 \exp_not:N \q_xparse_stop  #3 #2 {##2}
+        ##1 \exp_not:N \q_xparse  #3 #2 {##2}
     }
   }
-  \xparse_exp_set:cpx { \l_xparse_tmp_tl aux}
-    ##1 \q_xparse_stop ##2 #2 {
+  \xparse_exp_set:cpx { \l_xparse_tmp_tl aux} ##1 \q_xparse ##2 #2 {
     \exp_not:c {
       \exp_after:wN \token_to_str:N \l_xparse_function_tl
       \intexpr_eval:n { \l_xparse_total_args_int + 1 }
-    } ##1 {##2} \exp_not:N \q_xparse_stop
+    } ##1 {##2} \exp_not:N \q_xparse
   }
   \xparse_exp_prepare_function:N
 }
@@ -768,12 +766,12 @@
   \xparse_exp_set:cpx {
     \exp_after:wN \token_to_str:N \l_xparse_function_tl
     \int_use:N \l_xparse_total_args_int
-  } ##1 \q_xparse_stop ##2## {
+  } ##1 \q_xparse ##2## {
     \exp_not:c {
       \exp_after:wN \token_to_str:N \l_xparse_function_tl
       \intexpr_eval:n { \l_xparse_total_args_int + 1 }
     }
-    ##1 {##2} \exp_not:N \q_xparse_stop
+    ##1 {##2} \exp_not:N \q_xparse
   }
   \xparse_exp_prepare_function:N
 }
@@ -782,12 +780,12 @@
   \xparse_exp_set:cpx {
     \exp_after:wN \token_to_str:N \l_xparse_function_tl
     \int_use:N \l_xparse_total_args_int
-  } ##1 \q_xparse_stop ##2 {
+  } ##1 \q_xparse ##2 {
     \exp_not:c {
       \exp_after:wN \token_to_str:N \l_xparse_function_tl
       \intexpr_eval:n { \l_xparse_total_args_int + 1 }
     }
-    ##1 {##2} \exp_not:N \q_xparse_stop
+    ##1 {##2} \exp_not:N \q_xparse
   }
   \xparse_exp_prepare_function:N
 }
@@ -799,13 +797,13 @@
   \xparse_exp_set:cpx {
     \exp_after:wN \token_to_str:N \l_xparse_function_tl
     \int_use:N \l_xparse_total_args_int
-  } ##1 \q_xparse_stop ##2 {
+  } ##1 \q_xparse ##2 {
     \exp_not:N \tl_if_head_eq_charcode:nNTF {##2} #1 {
       \exp_not:c { \l_xparse_tmp_tl }
-      ##1 \exp_not:n { { \BooleanTrue } \q_xparse_stop }
+      ##1 \exp_not:n { { \BooleanTrue } \q_xparse }
     }{
       \exp_not:c { \l_xparse_tmp_tl }
-      ##1 \exp_not:n { { \BooleanFalse } \q_xparse_stop {##2} }
+      ##1 \exp_not:n { { \BooleanFalse } \q_xparse {##2} }
     }
   }
   \xparse_exp_prepare_function:N
@@ -814,12 +812,12 @@
   \xparse_exp_set:cpx {
     \exp_after:wN \token_to_str:N \l_xparse_function_tl
     \int_use:N \l_xparse_total_args_int
-  } ##1 \q_xparse_stop ##2 #1 {
+  } ##1 \q_xparse ##2 #1 {
     \exp_not:c {
       \exp_after:wN \token_to_str:N \l_xparse_function_tl
       \intexpr_eval:n { \l_xparse_total_args_int + 1 }
     }
-    ##1 {##2} \exp_not:N \q_xparse_stop
+    ##1 {##2} \exp_not:N \q_xparse
   }
   \xparse_exp_prepare_function:N
 }
@@ -871,11 +869,11 @@
 }
 \cs_new:Npn \xparse_exp_declare_cmd_mixed_aux:Nn #1#2 {
   \cs_set_nopar:Npx #1 {
-    \exp_not:c { \token_to_str:N #1 1 } x \exp_not:N \q_xparse_stop
+    \exp_not:c { \token_to_str:N #1 1 } x \exp_not:N \q_xparse
   }
   \cs_set_nopar:cpx {
     \token_to_str:N #1 \intexpr_eval:n { \l_xparse_total_args_int + 1  }
-  } x ##1 \q_xparse_stop {
+  } x ##1 \q_xparse {
     \exp_not:c { \token_to_str:N #1 } ##1
   }
   \cs_generate_from_arg_count:cNnn
@@ -922,7 +920,7 @@
 }
 \cs_new:Npn \xparse_exp_prepare_function_long:N #1 {
   \quark_if_nil:NF #1 {
-    \tl_if_eq:nnTF {#1} { + } {
+    \str_if_eq:nnTF {#1} { + } {
       \xparse_exp_prepare_function_short:N
     }{
       \msg_kernel_error:nn { xparse } { expandable-inconsistent-long }
@@ -991,7 +989,7 @@
   }
   {
     The~arguments~for~an~expandable~command~must~either~all~be \\
-    short~or~all~be~long.~You~have~tried~to mix~the~two~types.
+    short~or~all~be~long.~You~have~tried~to~mix~the~two~types.
   }
 \msg_kernel_new:nnnn { xparse } { grouped-in-expandable }
   {%
@@ -1060,7 +1058,9 @@
 }
 \cs_new_protected:Npn \RenewDocumentCommand #1#2#3 {
   \cs_if_exist:NTF #1 {
-    \xparse_declare_cmd:Nnn #1 {#2} {#3}
+    \xparse_declare_cmd_aux:Nnn #1 {#2} {#3}
+    \msg_kernel_info:nnxx { xparse } { redefine-command }
+      { \token_to_str:N #1 } { \exp_not:n {#2} }
   }{
     \msg_kernel_error:nnx { xparse } { command-not-yet-defined }
       { \token_to_str:N #1 }
-- 
cgit v1.2.3

