diff options
author | Karl Berry <karl@freefriends.org> | 2020-10-05 20:55:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-10-05 20:55:13 +0000 |
commit | 0a6a10589966c07c10f5ddaa83aa57e4f8bcc9d4 (patch) | |
tree | ab4fba8cb51631f0b798b2242dc7bb8386009397 /Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx | |
parent | 2d7e71c150a2b05cdfb3f5bf685e4255640b0760 (diff) |
l3 (5oct20)
git-svn-id: svn://tug.org/texlive/trunk@56556 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx | 101 |
1 files changed, 32 insertions, 69 deletions
diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx index fe2df64f5fa..dd40f2c2add 100644 --- a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx @@ -67,7 +67,7 @@ % }^^A % } % -% \date{Released 2020-05-15} +% \date{Released 2020-10-05} % % \maketitle % @@ -984,7 +984,7 @@ % % \begin{macrocode} %<*package> -\ProvidesExplPackage{xparse}{2020-05-15}{} +\ProvidesExplPackage{xparse}{2020-10-05}{} {L3 Experimental document command parser} % \end{macrocode} % @@ -1034,30 +1034,19 @@ %</core> % \end{macrocode} % -% Load the core code. +% Load the core code. We use \tn{input} here as there can be +% an issue if the user has |openin_any = p| with older binaries. % \begin{macrocode} %<*2ekernel|package> -\file_input:n { xparse-generic.tex } +\input { xparse-generic.tex } %</2ekernel|package> % \end{macrocode} % % \subsection{Variables and constants} % % \begin{macrocode} -%<*core|initex> -% \end{macrocode} -% -% \begin{variable}{\c_@@_special_chars_seq} -% In \IniTeX{} mode, we store special characters in a sequence. -% Maybe |$| or |&| will have to be added later. -% \begin{macrocode} -%<*initex> -\seq_new:N \c_@@_special_chars_seq -\seq_set_split:Nnn \c_@@_special_chars_seq { } - { \ \\ \{ \} \# \^ \_ \% \~ } -%</initex> +%<*core> % \end{macrocode} -% \end{variable} % % \begin{variable}{\l_@@_arg_spec_tl} % Holds the argument specification after normalization of shorthands. @@ -1484,12 +1473,7 @@ \str_set:Nx \l_@@_environment_str {#1} \str_set:Nx \l_@@_environment_str { \tl_trim_spaces:o { \l_@@_environment_str } } -%<*initex> - \cs_if_exist:cTF { environment~ \l_@@_environment_str } -%</initex> -%<*core> \cs_if_exist:cTF { \l_@@_environment_str } -%</core> { \__kernel_msg_info:nnxx { xparse } { redefine-environment } { \l_@@_environment_str } { \tl_to_str:n {#2} } @@ -1535,10 +1519,8 @@ \cs_generate_from_arg_count:cNnn { environment~ #1 ~end~aux~ } \cs_set:Npn \l_@@_current_arg_int {#4} -%<*core> \cs_set_eq:cc {#1} { environment~ #1 } \cs_set_eq:cc { end #1 } { environment~ #1 ~end } -%</core> } } % \end{macrocode} @@ -1558,9 +1540,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_start_env:nnnnn #1#2 { -%<*core> \cs_if_exist_use:N \conditionally@traceoff -%</core> \str_set:Nn \l_@@_environment_str {#2} \bool_set_true:N \l_@@_environment_bool \@@_start_aux:ccnnnn @@ -1570,9 +1550,7 @@ } \cs_new_protected:Npx \@@_start:nNNnnn #1#2#3 { -%<*core> \exp_not:n { \cs_if_exist_use:N \conditionally@traceoff } -%</core> \exp_not:c { xparse~function~is~not~expandable } \exp_not:n { \bool_set_false:N \l_@@_environment_bool } \exp_not:N \@@_start_aux:NNnnnn @@ -1609,9 +1587,7 @@ { \tl_if_empty:NF \l_@@_defaults_tl { \@@_defaults: } \tl_if_empty:NF \l_@@_process_all_tl { \@@_args_process: } -%<*core> \cs_if_exist_use:N \conditionally@traceon -%</core> \exp_after:wN \l_@@_fn_code_tl \l_@@_args_tl } % \end{macrocode} @@ -1913,7 +1889,7 @@ \@@_bad_def:wn } } -%</core|initex> +%</core> %<*package> \cs_gset_protected:Npn \@@_normalize_arg_spec_loop:n #1 { @@ -1927,7 +1903,7 @@ } } %</package> -%<*core|initex> +%<*core> % \end{macrocode} % \end{macro} % \end{macro} @@ -1974,12 +1950,12 @@ { \@@_normalize_type_t:w * } } \exp_args:No \@@_tmp:w { \c_novalue_tl } -%</core|initex> +%</core> %<*package> \cs_new_protected:Npx \@@_normalize_type_g:w { \exp_not:N \@@_normalize_type_G:w { \exp_not:V \c_novalue_tl } } %</package> -%<*core|initex> +%<*core> % \end{macrocode} % \end{macro} % @@ -2093,7 +2069,7 @@ \@@_normalize_E_unique_check:w #2 \q_stop } } -%</core|initex> +%</core> %<*package> \cs_new_protected:Npn \@@_normalize_type_G:w #1 { @@ -2104,7 +2080,7 @@ \@@_normalize_arg_spec_loop:n } %</package> -%<*core|initex> +%<*core> \cs_new_protected:Npn \@@_normalize_type_t:w #1 { \quark_if_recursion_tail_stop_do:Nn #1 { \@@_bad_arg_spec:wn } @@ -2141,7 +2117,7 @@ % \cs{l_@@_arg_spec_tl}, count the mandatory argument, and empty the % list of last delimiters. % \begin{macrocode} -%</core|initex> +%</core> %<*package> \cs_new_protected:Npn \@@_normalize_type_l:w { @@ -2150,7 +2126,7 @@ \@@_normalize_arg_spec_loop:n } %</package> -%<*core|initex> +%<*core> \cs_new_protected:Npn \@@_normalize_type_m:w { \@@_delimiter_check:nnn { } { m } { \iow_char:N \{ } @@ -2167,7 +2143,7 @@ \@@_add_arg_spec_mandatory:n { R #1 #2 {#3} } \@@_normalize_arg_spec_loop:n } -%</core|initex> +%</core> %<*package> \cs_new_protected:Npn \@@_normalize_type_u:w #1 { @@ -2177,7 +2153,7 @@ \@@_normalize_arg_spec_loop:n } %</package> -%<*core|initex> +%<*core> \cs_new_protected:Npn \@@_normalize_type_v:w { \@@_normalize_check_gv:N v @@ -2240,7 +2216,7 @@ % that is not possible without the risk of mistakenly grabbing the % entire brace group (potentially leading to a~\texttt{!~Runaway argument} % error) or trying to grab a |}|$_2$, leading to a~\texttt{!~Argument -% of~\dots~has an extra~|}|}. +% of~\dots~has an extra~\}}. % \begin{macrocode} \cs_new_protected:Npn \@@_allowed_token_check:N #1 { @@ -2536,7 +2512,7 @@ % For the \texttt{G} type, the grabber and the default are added to the % signature. % \begin{macrocode} -%</core|initex> +%</core> %<*package> \cs_new_protected:Npn \@@_add_type_G:w #1 { @@ -2560,7 +2536,7 @@ \@@_prepare_signature:N } %</package> -%<*core|initex> +%<*core> % \end{macrocode} % \end{macro} % @@ -2616,7 +2592,7 @@ % At the set up stage, the \texttt{u} type argument is identical to the % \texttt{G} type except for the name of the grabber function. % \begin{macrocode} -%</core|initex> +%</core> %<*package> \cs_new_protected:Npn \@@_add_type_u:w #1 { @@ -2627,7 +2603,7 @@ \@@_prepare_signature:N } %</package> -%<*core|initex> +%<*core> % \end{macrocode} % \end{macro} % @@ -2846,12 +2822,12 @@ % parameter text ends with |#| in fact end up being delimited by an % open brace. % \begin{macrocode} -%</core|initex> +%</core> %<*package> \cs_new_protected:Npn \@@_add_expandable_type_l:w { \@@_add_expandable_type_u:w ## } %</package> -%<*core|initex> +%<*core> % \end{macrocode} % \end{macro} % @@ -2900,7 +2876,7 @@ % Define an auxiliary that will be used directly in the signature. It % grabs one argument delimited by |#1| and places it before \cs{q_@@}. % \begin{macrocode} -%</core|initex> +%</core> %<*package> \cs_new_protected:Npn \@@_add_expandable_type_u:w #1 { @@ -2915,7 +2891,7 @@ \@@_prepare_signature:N } %</package> -%<*core|initex> +%<*core> % \end{macrocode} % \end{macro} % @@ -3319,7 +3295,7 @@ % Optional groups are checked by meaning, so that the same code will % work with, for example, \ConTeXt{}-like input. % \begin{macrocode} -%</core|initex> +%</core> %<*package> \cs_new_protected:Npn \@@_grab_G:w #1 \@@_run_code: { @@ -3350,8 +3326,6 @@ { \l_@@_fn_tl } { \@@_add_arg:o \c_novalue_tl } } -%</package> -%<*core|initex> % \end{macrocode} % \end{macro} % \end{macro} @@ -3364,8 +3338,6 @@ % \begin{macro}{\@@_grab_l_aux:nN} % Argument grabbers for mandatory \TeX{} arguments are pretty simple. % \begin{macrocode} -%</core|initex> -%<*package> \cs_new_protected:Npn \@@_grab_l:w #1 \@@_run_code: { \@@_grab_l_aux:nN {#1} \cs_set_protected_nopar:Npn } \cs_new_protected:Npn \@@_grab_l_long:w #1 \@@_run_code: @@ -3378,7 +3350,7 @@ \l_@@_fn_tl } %</package> -%<*core|initex> +%<*core> % \end{macrocode} % \end{macro} % \end{macro} @@ -3550,7 +3522,7 @@ % Grabbing up to a list of tokens is quite easy: define the grabber, % and then collect. % \begin{macrocode} -%</core|initex> +%</core> %<*package> \cs_new_protected:Npn \@@_grab_u:w #1#2 \@@_run_code: { \@@_grab_u_aux:nnN {#1} {#2} \cs_set_protected_nopar:Npn } @@ -3564,7 +3536,7 @@ \l_@@_fn_tl } %</package> -%<*core|initex> +%<*core> % \end{macrocode} % \end{macro} % \end{macro} @@ -3761,9 +3733,6 @@ % % \begin{macro}{\@@_grab_v_aux_catcodes:} % \begin{macro}{\@@_grab_v_aux_abort:n} -% In a standalone format, the list of special characters is kept -% as a sequence, \cs{c_@@_special_chars_seq}, and we use -% \tn{dospecials} in package mode. % The approach for short verbatim arguments is to make the end-line % character a macro parameter character: this is forbidden by the % rest of the code. Then the error branch can check what caused the @@ -3771,15 +3740,8 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_grab_v_aux_catcodes: { -%<*initex> - \seq_map_function:NN - \c_@@_special_chars_seq - \char_set_catcode_other:N -%</initex> -%<*core> \cs_set_eq:NN \do \char_set_catcode_other:N \dospecials -%</core> \tex_endlinechar:D = `\^^M \scan_stop: \bool_if:NTF \l_@@_long_bool { \char_set_catcode_other:n { \tex_endlinechar:D } } @@ -5200,10 +5162,11 @@ % \end{macro} % % \begin{macrocode} -%<*core> \@@_file_end_hook: +% \end{macrocode} +% +% \begin{macrocode} %</core> -%</core|initex> % \end{macrocode} % % \begin{macrocode} |