summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx87
1 files changed, 37 insertions, 50 deletions
diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
index d204fd20a94..d2c106fc0d3 100644
--- a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
+++ b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx
@@ -41,8 +41,8 @@
%<*driver|package>
% The version of expl3 required is tested as early as possible, as
% some really old versions do not define \ProvidesExplPackage.
-\RequirePackage{expl3}[2015/09/11]
-%<package>\@ifpackagelater{expl3}{2015/09/11}
+\RequirePackage{expl3}[2015/09/27]
+%<package>\@ifpackagelater{expl3}{2015/09/27}
%<package> {}
%<package> {%
%<package> \PackageError{xparse}{Support package l3kernel too old}
@@ -54,7 +54,7 @@
%<package> }%
%<package> \endinput
%<package> }
-\GetIdInfo$Id: xparse.dtx 6001 2015-09-11 21:50:23Z joseph $
+\GetIdInfo$Id: xparse.dtx 6111 2015-09-27 16:06:17Z joseph $
{L3 Experimental document command parser}
%</driver|package>
%<*driver>
@@ -717,15 +717,8 @@
% different category codes. This is used as the marker for nothing being
% returned when no optional argument is given.
% \begin{macrocode}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \tl_const:Nn \c_@@_no_value_tl { QNoValue- }
- }
+\tl_const:Nx \c_@@_no_value_tl
+ { \char_generate:nn { `\- } { 11 } NoValue- }
% \end{macrocode}
% \end{variable}
%
@@ -1919,7 +1912,7 @@
}
}
% \end{macrocode}
-% This section needs a little explanation. In order to avoid loosing any
+% This section needs a little explanation. In order to avoid losing any
% braces, a token needs to be inserted before the argument to be grabbed.
% If the argument runs away because the closing token is missing then this
% inserted token shows up in the terminal. Ideally, |#1| would therefore be
@@ -1932,24 +1925,20 @@
% with different category codes, but that really should not happen in any
% sensible document-level syntax.)
% \begin{macrocode}
- \group_begin:
- \token_if_eq_catcode:NNTF #1 ^
- {
+ \token_if_eq_catcode:NNTF + #1
+ {
+ \group_begin:
\char_set_lccode:nn { `A } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
\group_end:
\l_@@_fn_tl A
}
- }
- {
- \char_set_lccode:nn { `^ } { `#1 }
- \tl_to_lowercase:n
- {
- \group_end:
- \l_@@_fn_tl ^
- }
- }
+ }
+ {
+ \exp_after:wN \l_@@_fn_tl
+ \token_to_str:N #1
+ }
}
}
% \end{macrocode}
@@ -2536,7 +2525,7 @@
\@@_add_arg:o \c_@@_no_value_tl
\group_begin:
\char_set_lccode:nn { `\# } { \tex_endlinechar:D }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{ \group_end: \peek_meaning_remove:NTF ## }
{
\__msg_kernel_error:nnxxx { xparse } { verbatim-newline }
@@ -2960,12 +2949,12 @@
\tl_set:Nn \l_@@_split_list_tl {#2}
\group_begin:
\char_set_lccode:nn { `\@ } { `#1 }
- \tl_to_lowercase:n
+ \tex_lowercase:D
{
- \group_end:
- \tl_replace_all:Nnn \l_@@_split_list_tl { @ } {#1}
- }
- \@@_split_list_multi:nV {#1} \l_@@_split_list_tl
+ \group_end:
+ \tl_replace_all:Nnn \l_@@_split_list_tl { @ }
+ } {#1}
+ \@@_split_list_multi:nV {#1} \l_@@_split_list_tl
}
\group_end:
% \end{macrocode}
@@ -3112,24 +3101,22 @@
% up to be expandable. The question mark prevents the auxiliary from
% losing braces.
% \begin{macrocode}
-\group_begin:
-\char_set_lccode:nn { `\Q } { `\- }
-\char_set_lccode:nn { `\F } { `\F }
-\char_set_lccode:nn { `\N } { `\N }
-\char_set_lccode:nn { `\T } { `\T }
-\char_set_lccode:nn { `\V } { `\V }
-\tl_to_lowercase:n
- {
- \group_end:
- \prg_new_conditional:Npnn \@@_if_no_value:n #1 { T , F , TF }
- {
- \str_if_eq:onTF
- { \@@_if_value_aux:w ? #1 { } QNoValue- }
- { ? { } QNoValue- }
- { \prg_return_true: }
- { \prg_return_false: }
- }
- \cs_new:Npn \@@_if_value_aux:w #1 QNoValue- { #1 }
+\use:x
+ {
+ \prg_new_conditional:Npnn \exp_not:N \@@_if_no_value:n ##1
+ { T , F , TF }
+ {
+ \exp_not:N \str_if_eq:onTF
+ {
+ \exp_not:N \@@_if_value_aux:w ? ##1 { }
+ \c_@@_no_value_tl
+ }
+ { ? { } \c_@@_no_value_tl }
+ { \exp_not:N \prg_return_true: }
+ { \exp_not:N \prg_return_false: }
+ }
+ \cs_new:Npn \exp_not:N \@@_if_value_aux:w ##1 \c_@@_no_value_tl
+ { ##1 }
}
% \end{macrocode}
% \end{macro}