diff options
author | Karl Berry <karl@freefriends.org> | 2010-05-19 23:24:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-05-19 23:24:13 +0000 |
commit | 97a0746aa6e947818c4d32c3b70e899907124c22 (patch) | |
tree | 286f8d2512ef746cf076a12f16e593f262e18009 /Master/texmf-dist/source/latex/expl3 | |
parent | 994e8740e5b5588a65c3baec92333b81ae2edd54 (diff) |
expl3 1905 (19may10)
git-svn-id: svn://tug.org/texlive/trunk@18357 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/expl3')
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/expl3.dtx | 152 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3basics.dtx | 349 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3box.dtx | 14 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3doc.dtx | 8 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3int.dtx | 11 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3io.dtx | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3keys.dtx | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3keyval.dtx | 12 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3seq.dtx | 30 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3skip.dtx | 18 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3tl.dtx | 195 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3token.dtx | 9 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3toks.dtx | 13 |
13 files changed, 469 insertions, 354 deletions
diff --git a/Master/texmf-dist/source/latex/expl3/expl3.dtx b/Master/texmf-dist/source/latex/expl3/expl3.dtx index 7f8292d609a..63fb9616c72 100644 --- a/Master/texmf-dist/source/latex/expl3/expl3.dtx +++ b/Master/texmf-dist/source/latex/expl3/expl3.dtx @@ -37,7 +37,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: expl3.dtx 1866 2010-03-23 08:29:27Z joseph $ +\GetIdInfo$Id: expl3.dtx 1905 2010-05-19 07:45:31Z joseph $ {L3 Experimental code bundle wrapper}% %\iffalse %<*driver> @@ -865,6 +865,24 @@ % \begin{macrocode} \RequirePackage{etex} % \end{macrocode} +% +%\begin{macro}{\@l@expl@check@declarations@bool} +%\begin{macro}{\@l@expl@log@functions@bool} +% A couple of package options to be provided. +% These have to be done by hand as there is no expl3 yet. +% \begin{macrocode} +\newcommand*\@l@expl@check@declarations@bool{0} +\newcommand*\@l@expl@log@functions@bool{0} +\DeclareOption{check-declarations}{ + \def\@l@expl@check@declarations@bool{1} +} +\DeclareOption{log-functions}{ + \def\@l@expl@log@functions@bool{1} +} +\ProcessOptions\relax +% \end{macrocode} +%\end{macro} +%\end{macro} % % We already loaded \pkg{l3names} at the beginning of the \texttt{dtx} file. % @@ -904,24 +922,9 @@ l3file } % \end{macrocode} -% -%\begin{macro}{\_l_expl_check_declarations_bool} -% To indicate that token list variables should exist before -% assignment, a flag is created and a single option provided. -% \begin{macrocode} -\bool_new:N \_l_expl_check_declarations_bool -\DeclareOption{check-declarations}{ - \bool_set_true:N \_l_expl_check_declarations_bool -} -\ProcessOptions \scan_stop: -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\_tl_check_exists:N} -% If the option is active, redefine token list variable functions to -% be picky. +% % \begin{macrocode} -\bool_if:NT \_l_expl_check_declarations_bool { +\bool_if:nT { \@l@expl@check@declarations@bool } { \msg_kernel_new:nnnn { check } { non-declared-variable } { The~variable~#1~has~not~been~declared~\msg_line_context:. } { @@ -933,121 +936,8 @@ \\ LaTeX~will~create~the~variable~and~continue. } - \cs_set_protected:Npn \_tl_check_exists:N #1 - { - \cs_if_exist:NF #1 - { - \msg_kernel_error:nnx { check } { non-declared-variable } - { \token_to_str:N #1 } - } - } - \cs_set_protected:Npn \tl_set:Nn #1#2 - { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:n {#2} } - } - \cs_set_protected:Npn \tl_set:Nx #1#2 - { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 {#2} - } - \cs_set_protected:Npn \tl_gset:Nn #1#2 - { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } - } - \cs_set_protected:Npn \tl_gset:Nx #1#2 - { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 {#2} - } - \cs_set_protected:Npn \tl_set_eq:NN #1#2 - { - \_tl_check_exists:N #1 - \_tl_check_exists:N #2 - \cs_set_eq:NN #1 #2 - } - \cs_set_protected:Npn \tl_gset_eq:NN #1#2 - { - \_tl_check_exists:N #1 - \_tl_check_exists:N #2 - \cs_gset_eq:NN #1 #2 - } - \cs_set_protected:Npn \tl_put_right:Nn #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:n {#2} } - } - \cs_set_protected:Npn \tl_put_right:NV #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:V #2 } - } - \cs_set_protected:Npn \tl_put_right:Nv #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:v {#2} } - } - \cs_set_protected:Npn \tl_put_right:No #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:o {#2} } - } - \cs_set_protected:Npn \tl_put_right:Nx #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:V #1 #2 } - } - \cs_set_protected:Npn \tl_gput_right:Nn #1#2 { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 { \exp_not:V #1 \exp_not:n {#2} } - } - \cs_set_protected:Npn \tl_gput_right:NV #1#2 { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 { \exp_not:V #1 \exp_not:V #2 } - } - \cs_set_protected:Npn \tl_gput_right:Nv #1#2 { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 { \exp_not:V #1 \exp_not:v {#2} } - } - \cs_set_protected:Npn \tl_gput_right:Nx #1#2 { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 { \exp_not:V #1 #2 } - } - \cs_set_protected:Npn \tl_put_left:Nn #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:n {#2} \exp_not:V #1 } - } - \cs_set_protected:Npn \tl_put_left:NV #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:V #2 \exp_not:V #1 } - } - \cs_set_protected:Npn \tl_put_left:Nv #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:v {#2} \exp_not:V #1 } - } - \cs_set_protected:Npn \tl_put_left:No #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { \exp_not:o {#2} \exp_not:V #1 } - } - \cs_set_protected:Npn \tl_put_left:Nx #1#2 { - \_tl_check_exists:N #1 - \cs_set_nopar:Npx #1 { #2 \exp_not:V #1 } - } - \cs_set_protected:Npn \tl_gput_left:Nn #1#2 { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 { \exp_not:n {#2} \exp_not:V #1 } - } - \cs_set_protected:Npn \tl_gput_left:NV #1#2 { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 { \exp_not:V #2 \exp_not:V #1 } - } - \cs_set_protected:Npn \tl_gput_left:Nv #1#2 { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 { \exp_not:v {#2} \exp_not:V #1 } - } - \cs_set_protected:Npn \tl_gput_left:Nx #1#2 { - \_tl_check_exists:N #1 - \cs_gset_nopar:Npx #1 { #2 \exp_not:V #1 } - } } % \end{macrocode} -%\end{macro} % %</package> % diff --git a/Master/texmf-dist/source/latex/expl3/l3basics.dtx b/Master/texmf-dist/source/latex/expl3/l3basics.dtx index d4466987e6d..defe09a5277 100644 --- a/Master/texmf-dist/source/latex/expl3/l3basics.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3basics.dtx @@ -35,7 +35,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3basics.dtx 1853 2010-03-21 09:11:08Z joseph $ +\GetIdInfo$Id: l3basics.dtx 1905 2010-05-19 07:45:31Z joseph $ {L3 Experimental basic definitions} %\iffalse %<*driver> @@ -703,15 +703,14 @@ % when called. This is not allowed for normal functions. % \end{function} % -% \begin{function}{\cs_gnew:Npn | -% \cs_gnew:Npx | -% \cs_gnew:cpn | -% \cs_gnew:cpx -% } +% \begin{function}{\cs_new_local:Npn | +% \cs_new_local:Npx | +% \cs_new_local:cpn | +% \cs_new_local:cpx } % \begin{syntax} -% "\cs_gnew:Npn" <cs> <parms> \Arg{code} +% "\cs_new_local:Npn" <cs> <parms> \Arg{code} % \end{syntax} -% Global versions of the above functions. +% Local versions of the above functions. % \end{function} % % \begin{function}{\cs_new_nopar:Npn | @@ -730,15 +729,14 @@ % (under the "x" variants). % \end{function} % -% \begin{function}{\cs_gnew_nopar:Npn | -% \cs_gnew_nopar:Npx | -% \cs_gnew_nopar:cpn | -% \cs_gnew_nopar:cpx -% } +% \begin{function}{\cs_new_local_nopar:Npn | +% \cs_new_local_nopar:Npx | +% \cs_new_local_nopar:cpn | +% \cs_new_local_nopar:cpx } % \begin{syntax} -% "\cs_gnew_nopar:Npn" <cs> <parms> \Arg{code} +% "\cs_new_local_nopar:Npn" <cs> <parms> \Arg{code} % \end{syntax} -% Like "\cs_new_nopar:Npn" but defines the new function globally. See +% Like "\cs_new_nopar:Npn" but defines the new function locally. See % comments above. % \end{function} % @@ -754,14 +752,14 @@ % in the argument(s) when called. % \end{function} % -% \begin{function}{ \cs_gnew_protected:Npn | -% \cs_gnew_protected:Npx | -% \cs_gnew_protected:cpn | -% \cs_gnew_protected:cpx } +% \begin{function}{ \cs_new_local_protected:Npn | +% \cs_new_local_protected:Npx | +% \cs_new_local_protected:cpn | +% \cs_new_local_protected:cpx } % \begin{syntax} -% "\cs_gnew_protected:Npn" <cs> <parms> \Arg{code} +% "\cs_new_local_protected:Npn" <cs> <parms> \Arg{code} % \end{syntax} -% Global versions of the above functions. +% Local versions of the above functions. % \end{function} % % \begin{function}{\cs_new_protected_nopar:Npn | @@ -776,15 +774,14 @@ % expansion. % \end{function} % -% \begin{function}{\cs_gnew_protected_nopar:Npn | -% \cs_gnew_protected_nopar:Npx | -% \cs_gnew_protected_nopar:cpn | -% \cs_gnew_protected_nopar:cpx -% } +% \begin{function}{\cs_new_local_protected_nopar:Npn | +% \cs_new_local_protected_nopar:Npx | +% \cs_new_local_protected_nopar:cpn | +% \cs_new_local_protected_nopar:cpx } % \begin{syntax} -% "\cs_gnew_protected_nopar:Npn" <cs> <parms> \Arg{code} +% "\cs_new_local_protected_nopar:Npn" <cs> <parms> \Arg{code} % \end{syntax} -% Global versions of the above functions. +% Local versions of the above functions. % \end{function} % % @@ -821,15 +818,15 @@ % \end{texnote} % \end{function} % -% \begin{function}{\cs_gnew:Nn | -% \cs_gnew:Nx | -% \cs_gnew:cn | -% \cs_gnew:cx +% \begin{function}{\cs_new_local:Nn | +% \cs_new_local:Nx | +% \cs_new_local:cn | +% \cs_new_local:cx % } % \begin{syntax} -% "\cs_gnew:Nn" <cs> \Arg{code} +% "\cs_new_local:Nn" <cs> \Arg{code} % \end{syntax} -% Global versions of the above functions. +% Local versions of the above functions. % \end{function} % % \begin{function}{\cs_new_nopar:Nn | @@ -844,15 +841,15 @@ % argument(s) of the defined functions. % \end{function} % -% \begin{function}{\cs_gnew_nopar:Nn | -% \cs_gnew_nopar:Nx | -% \cs_gnew_nopar:cn | -% \cs_gnew_nopar:cx +% \begin{function}{\cs_new_local_nopar:Nn | +% \cs_new_local_nopar:Nx | +% \cs_new_local_nopar:cn | +% \cs_new_local_nopar:cx % } % \begin{syntax} -% "\cs_gnew_nopar:Nn" <cs> \Arg{code} +% "\cs_new_local_nopar:Nn" <cs> \Arg{code} % \end{syntax} -% Global versions of the above functions. +% Local versions of the above functions. % \end{function} % % \begin{function}{\cs_new_protected:Nn | @@ -867,15 +864,15 @@ % in the argument(s) when called. % \end{function} % -% \begin{function}{\cs_gnew_protected:Nn | -% \cs_gnew_protected:Nx | -% \cs_gnew_protected:cn | -% \cs_gnew_protected:cx +% \begin{function}{\cs_new_local_protected:Nn | +% \cs_new_local_protected:Nx | +% \cs_new_local_protected:cn | +% \cs_new_local_protected:cx % } % \begin{syntax} -% "\cs_gnew_protected:Nn" <cs> \Arg{code} +% "\cs_new_local_protected:Nn" <cs> \Arg{code} % \end{syntax} -% Global versions of the above functions. +% Local versions of the above functions. % \end{function} % % \begin{function}{\cs_new_protected_nopar:Nn | @@ -890,15 +887,15 @@ % expansion. "\par" is not allowed in the argument(s) of the defined function. % \end{function} % -% \begin{function}{\cs_gnew_protected_nopar:Nn | -% \cs_gnew_protected_nopar:Nx | -% \cs_gnew_protected_nopar:cn | -% \cs_gnew_protected_nopar:cx +% \begin{function}{\cs_new_local_protected_nopar:Nn | +% \cs_new_local_protected_nopar:Nx | +% \cs_new_local_protected_nopar:cn | +% \cs_new_local_protected_nopar:cx % } % \begin{syntax} -% "\cs_gnew_protected_nopar:Nn" <cs> \Arg{code} +% "\cs_new_local_protected_nopar:Nn" <cs> \Arg{code} % \end{syntax} -% Global versions of the above functions. +% Local versions of the above functions. % \end{function} % % @@ -1148,10 +1145,10 @@ % \cs_new_eq:cN | % \cs_new_eq:Nc | % \cs_new_eq:cc | -% \cs_gnew_eq:NN | -% \cs_gnew_eq:cN | -% \cs_gnew_eq:Nc | -% \cs_gnew_eq:cc } +% \cs_new_local_eq:NN | +% \cs_new_local_eq:cN | +% \cs_new_local_eq:Nc | +% \cs_new_local_eq:cc } % \begin{syntax} % "\cs_new_eq:NN" <cs1> <cs2> % \end{syntax} @@ -1628,7 +1625,7 @@ \cs_set_protected:Npn \use:x #1 { \group_begin: \cs_set:Npx \cs_tmp: {#1} - \exp_args:wN + \exp_after:wN \group_end: \cs_tmp: } @@ -2433,6 +2430,21 @@ \cs_set_protected_nopar:Npn \chk_if_free_cs:c { \exp_args:Nc \chk_if_free_cs:N } +%<*package> +\tex_ifodd:D \@l@expl@log@functions@bool \else + \cs_set_protected_nopar:Npn \chk_if_free_cs:N #1 { + \cs_if_free:NF #1 + { + \msg_kernel_bug:x + { + Command~name~`\token_to_str:N #1'~ + already~defined!~ + Current~meaning:~\token_to_meaning:N #1 + } + } + } +\fi +%</package> % \end{macrocode} % \end{macro} % \end{macro} @@ -2544,14 +2556,14 @@ % % % -% \begin{macro}{\cs_new_nopar:Npn} -% \begin{macro}{\cs_new_nopar:Npx} -% \begin{macro}{\cs_new:Npn} -% \begin{macro}{\cs_new:Npx} -% \begin{macro}{\cs_new_protected_nopar:Npn} -% \begin{macro}{\cs_new_protected_nopar:Npx} -% \begin{macro}{\cs_new_protected:Npn} -% \begin{macro}{\cs_new_protected:Npx} +% \begin{macro}{\cs_new_local_nopar:Npn} +% \begin{macro}{\cs_new_local_nopar:Npx} +% \begin{macro}{\cs_new_local:Npn} +% \begin{macro}{\cs_new_local:Npx} +% \begin{macro}{\cs_new_local_protected_nopar:Npn} +% \begin{macro}{\cs_new_local_protected_nopar:Npx} +% \begin{macro}{\cs_new_local_protected:Npn} +% \begin{macro}{\cs_new_local_protected:Npx} % These are like |\cs_set_nopar:Npn| and |\cs_set_eq:NN|, but they % first check that the argument command is not already in use. You % may use |\pref_global:D|, |\pref_long:D|, |\pref_protected:D|, and @@ -2563,14 +2575,14 @@ #2 ##1 } } -\cs_tmp:w \cs_new_nopar:Npn \cs_set_nopar:Npn -\cs_tmp:w \cs_new_nopar:Npx\cs_set_nopar:Npx -\cs_tmp:w \cs_new:Npn \cs_set:Npn -\cs_tmp:w \cs_new:Npx\cs_set:Npx -\cs_tmp:w \cs_new_protected_nopar:Npn \cs_set_protected_nopar:Npn -\cs_tmp:w \cs_new_protected_nopar:Npx\cs_set_protected_nopar:Npx -\cs_tmp:w \cs_new_protected:Npn \cs_set_protected:Npn -\cs_tmp:w \cs_new_protected:Npx\cs_set_protected:Npx +\cs_tmp:w \cs_new_local_nopar:Npn \cs_set_nopar:Npn +\cs_tmp:w \cs_new_local_nopar:Npx \cs_set_nopar:Npx +\cs_tmp:w \cs_new_local:Npn \cs_set:Npn +\cs_tmp:w \cs_new_local:Npx \cs_set:Npx +\cs_tmp:w \cs_new_local_protected_nopar:Npn \cs_set_protected_nopar:Npn +\cs_tmp:w \cs_new_local_protected_nopar:Npx \cs_set_protected_nopar:Npx +\cs_tmp:w \cs_new_local_protected:Npn \cs_set_protected:Npn +\cs_tmp:w \cs_new_local_protected:Npx \cs_set_protected:Npx % \end{macrocode} % \end{macro} % \end{macro} @@ -2581,24 +2593,24 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\cs_gnew_nopar:Npn} -% \begin{macro}{\cs_gnew_nopar:Npx} -% \begin{macro}{\cs_gnew:Npn} -% \begin{macro}{\cs_gnew:Npx} -% \begin{macro}{\cs_gnew_protected_nopar:Npn} -% \begin{macro}{\cs_gnew_protected_nopar:Npx} -% \begin{macro}{\cs_gnew_protected:Npn} -% \begin{macro}{\cs_gnew_protected:Npx} +% \begin{macro}{\cs_new_nopar:Npn} +% \begin{macro}{\cs_new_nopar:Npx} +% \begin{macro}{\cs_new:Npn} +% \begin{macro}{\cs_new:Npx} +% \begin{macro}{\cs_new_protected_nopar:Npn} +% \begin{macro}{\cs_new_protected_nopar:Npx} +% \begin{macro}{\cs_new_protected:Npn} +% \begin{macro}{\cs_new_protected:Npx} % Global versions of the above functions. % \begin {macrocode} -\cs_tmp:w \cs_gnew_nopar:Npn \cs_gset_nopar:Npn -\cs_tmp:w \cs_gnew_nopar:Npx \cs_gset_nopar:Npx -\cs_tmp:w \cs_gnew:Npn \cs_gset:Npn -\cs_tmp:w \cs_gnew:Npx \cs_gset:Npx -\cs_tmp:w \cs_gnew_protected_nopar:Npn \cs_gset_protected_nopar:Npn -\cs_tmp:w \cs_gnew_protected_nopar:Npx \cs_gset_protected_nopar:Npx -\cs_tmp:w \cs_gnew_protected:Npn \cs_gset_protected:Npn -\cs_tmp:w \cs_gnew_protected:Npx \cs_gset_protected:Npx +\cs_tmp:w \cs_new_nopar:Npn \cs_gset_nopar:Npn +\cs_tmp:w \cs_new_nopar:Npx \cs_gset_nopar:Npx +\cs_tmp:w \cs_new:Npn \cs_gset:Npn +\cs_tmp:w \cs_new:Npx \cs_gset:Npx +\cs_tmp:w \cs_new_protected_nopar:Npn \cs_gset_protected_nopar:Npn +\cs_tmp:w \cs_new_protected_nopar:Npx \cs_gset_protected_nopar:Npx +\cs_tmp:w \cs_new_protected:Npn \cs_gset_protected:Npn +\cs_tmp:w \cs_new_protected:Npx \cs_gset_protected:Npx % \end{macrocode} % \end{macro} % \end{macro} @@ -2610,14 +2622,15 @@ % \end{macro} % % +% % \begin{macro}{\cs_set_nopar:cpn} % \begin{macro}{\cs_set_nopar:cpx} % \begin{macro}{\cs_gset_nopar:cpn} % \begin{macro}{\cs_gset_nopar:cpx} % \begin{macro}{\cs_new_nopar:cpn} % \begin{macro}{\cs_new_nopar:cpx} -% \begin{macro}{\cs_gnew_nopar:cpn} -% \begin{macro}{\cs_gnew_nopar:cpx} +% \begin{macro}{\cs_new_local_nopar:cpn} +% \begin{macro}{\cs_new_local_nopar:cpx} % Like |\cs_set_nopar:Npn| and |\cs_new_nopar:Npn|, except that the % first argument consists of the sequence of characters that should % be used to form the name of the desired control sequence (the |c| @@ -2636,10 +2649,10 @@ \cs_tmp:w \cs_set_nopar:cpx \cs_set_nopar:Npx \cs_tmp:w \cs_gset_nopar:cpn \cs_gset_nopar:Npn \cs_tmp:w \cs_gset_nopar:cpx \cs_gset_nopar:Npx -\cs_tmp:w \cs_new_nopar:cpn \cs_new_nopar:Npn -\cs_tmp:w \cs_new_nopar:cpx \cs_new_nopar:Npx -\cs_tmp:w \cs_gnew_nopar:cpn \cs_gnew_nopar:Npn -\cs_tmp:w \cs_gnew_nopar:cpx \cs_gnew_nopar:Npx +\cs_tmp:w \cs_new_local_nopar:cpn \cs_new_local_nopar:Npn +\cs_tmp:w \cs_new_local_nopar:cpx \cs_new_local_nopar:Npx +\cs_tmp:w \cs_new_nopar:cpn \cs_new_nopar:Npn +\cs_tmp:w \cs_new_nopar:cpx \cs_new_nopar:Npx % \end{macrocode} % \end{macro} % \end{macro} @@ -2658,8 +2671,8 @@ % \begin{macro}{\cs_gset:cpx} % \begin{macro}{\cs_new:cpn} % \begin{macro}{\cs_new:cpx} -% \begin{macro}{\cs_gnew:cpn} -% \begin{macro}{\cs_gnew:cpx} +% \begin{macro}{\cs_new_local:cpn} +% \begin{macro}{\cs_new_local:cpx} % Variants of the |\cs_set:Npn| versions which make a csname out % of the first arguments. We may also do this globally. % \begin{macrocode} @@ -2669,8 +2682,8 @@ \cs_tmp:w \cs_gset:cpx \cs_gset:Npx \cs_tmp:w \cs_new:cpn \cs_new:Npn \cs_tmp:w \cs_new:cpx \cs_new:Npx -\cs_tmp:w \cs_gnew:cpn \cs_gnew:Npn -\cs_tmp:w \cs_gnew:cpx \cs_gnew:Npx +\cs_tmp:w \cs_new_local:cpn \cs_new_local:Npn +\cs_tmp:w \cs_new_local:cpx \cs_new_local:Npx % \end{macrocode} % \end{macro} % \end{macro} @@ -2687,8 +2700,8 @@ % \begin{macro}{\cs_gset_protected_nopar:cpx} % \begin{macro}{\cs_new_protected_nopar:cpn} % \begin{macro}{\cs_new_protected_nopar:cpx} -% \begin{macro}{\cs_gnew_protected_nopar:cpn} -% \begin{macro}{\cs_gnew_protected_nopar:cpx} +% \begin{macro}{\cs_new_local_protected_nopar:cpn} +% \begin{macro}{\cs_new_local_protected_nopar:cpx} % Variants of the |\cs_set_protected_nopar:Npn| versions which make a csname % out of the first arguments. We may also do this globally. % \begin{macrocode} @@ -2698,8 +2711,8 @@ \cs_tmp:w \cs_gset_protected_nopar:cpx \cs_gset_protected_nopar:Npx \cs_tmp:w \cs_new_protected_nopar:cpn \cs_new_protected_nopar:Npn \cs_tmp:w \cs_new_protected_nopar:cpx \cs_new_protected_nopar:Npx -\cs_tmp:w \cs_gnew_protected_nopar:cpn \cs_gnew_protected_nopar:Npn -\cs_tmp:w \cs_gnew_protected_nopar:cpx \cs_gnew_protected_nopar:Npx +\cs_tmp:w \cs_new_local_protected_nopar:cpn \cs_new_local_protected_nopar:Npn +\cs_tmp:w \cs_new_local_protected_nopar:cpx \cs_new_local_protected_nopar:Npx % \end{macrocode} % \end{macro} % \end{macro} @@ -2716,8 +2729,8 @@ % \begin{macro}{\cs_gset_protected:cpx} % \begin{macro}{\cs_new_protected:cpn} % \begin{macro}{\cs_new_protected:cpx} -% \begin{macro}{\cs_gnew_protected:cpn} -% \begin{macro}{\cs_gnew_protected:cpx} +% \begin{macro}{\cs_new_local_protected:cpn} +% \begin{macro}{\cs_new_local_protected:cpx} % Variants of the |\cs_set_protected:Npn| versions which make a csname % out of the first arguments. We may also do this globally. % \begin{macrocode} @@ -2727,8 +2740,8 @@ \cs_tmp:w \cs_gset_protected:cpx \cs_gset_protected:Npx \cs_tmp:w \cs_new_protected:cpn \cs_new_protected:Npn \cs_tmp:w \cs_new_protected:cpx \cs_new_protected:Npx -\cs_tmp:w \cs_gnew_protected:cpn \cs_gnew_protected:Npn -\cs_tmp:w \cs_gnew_protected:cpx \cs_gnew_protected:Npx +\cs_tmp:w \cs_new_local_protected:cpn \cs_new_local_protected:Npn +\cs_tmp:w \cs_new_local_protected:cpx \cs_new_local_protected:Npx % \end{macrocode} % \end{macro} % \end{macro} @@ -2739,6 +2752,26 @@ % \end{macro} % \end{macro} % +% BACKWARDS COMPATIBILITY: +% \begin{macrocode} +\cs_set_eq:NwN \cs_gnew_nopar:Npn \cs_new_nopar:Npn +\cs_set_eq:NwN \cs_gnew:Npn \cs_new:Npn +\cs_set_eq:NwN \cs_gnew_protected_nopar:Npn \cs_new_protected_nopar:Npn +\cs_set_eq:NwN \cs_gnew_protected:Npn \cs_new_protected:Npn +\cs_set_eq:NwN \cs_gnew_nopar:Npx \cs_new_nopar:Npx +\cs_set_eq:NwN \cs_gnew:Npx \cs_new:Npx +\cs_set_eq:NwN \cs_gnew_protected_nopar:Npx \cs_new_protected_nopar:Npx +\cs_set_eq:NwN \cs_gnew_protected:Npx \cs_new_protected:Npx +\cs_set_eq:NwN \cs_gnew_nopar:cpn \cs_new_nopar:cpn +\cs_set_eq:NwN \cs_gnew:cpn \cs_new:cpn +\cs_set_eq:NwN \cs_gnew_protected_nopar:cpn \cs_new_protected_nopar:cpn +\cs_set_eq:NwN \cs_gnew_protected:cpn \cs_new_protected:cpn +\cs_set_eq:NwN \cs_gnew_nopar:cpx \cs_new_nopar:cpx +\cs_set_eq:NwN \cs_gnew:cpx \cs_new:cpx +\cs_set_eq:NwN \cs_gnew_protected_nopar:cpx \cs_new_protected_nopar:cpx +\cs_set_eq:NwN \cs_gnew_protected:cpx \cs_new_protected:cpx +% \end{macrocode} +% % % \begin{macro}[aux]{\use_0_parameter:} % \begin{macro}[aux]{\use_1_parameter:} @@ -2816,7 +2849,7 @@ % \begin{macrocode} \cs_new_protected:Npn \cs_new_eq:NN #1 { \chk_if_free_cs:N #1 - \cs_set_eq:NN #1 + \pref_global:D \cs_set_eq:NN #1 } \cs_new_protected_nopar:Npn \cs_new_eq:cN { \exp_args:Nc \cs_new_eq:NN } \cs_new_protected_nopar:Npn \cs_new_eq:Nc { \exp_args:NNc \cs_new_eq:NN } @@ -2842,14 +2875,14 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\cs_gnew_eq:NN} -% \begin{macro}{\cs_gnew_eq:cN} -% \begin{macro}{\cs_gnew_eq:Nc} -% \begin{macro}{\cs_gnew_eq:cc} +% \begin{macro}{\cs_new_local_eq:NN} +% \begin{macro}{\cs_new_local_eq:cN} +% \begin{macro}{\cs_new_local_eq:Nc} +% \begin{macro}{\cs_new_local_eq:cc} % \begin{macrocode} -\cs_new_protected:Npn \cs_gnew_eq:NN #1 { +\cs_new_protected:Npn \cs_new_local_eq:NN #1 { \chk_if_free_cs:N #1 - \pref_global:D \cs_set_eq:NN #1 + \cs_set_eq:NN #1 } \cs_new_protected_nopar:Npn \cs_gnew_eq:cN { \exp_args:Nc \cs_gnew_eq:NN } \cs_new_protected_nopar:Npn \cs_gnew_eq:Nc { \exp_args:NNc \cs_gnew_eq:NN } @@ -2860,6 +2893,13 @@ % \end{macro} % \end{macro} % +% BACKWARDS COMPATIBILITY +% \begin{macrocode} +\cs_set_eq:NN \cs_gnew_eq:NN \cs_new_eq:NN +\cs_set_eq:NN \cs_gnew_eq:cN \cs_new_eq:cN +\cs_set_eq:NN \cs_gnew_eq:Nc \cs_new_eq:Nc +\cs_set_eq:NN \cs_gnew_eq:cc \cs_new_eq:cc +% \end{macrocode} % % \subsection{Undefining functions} % @@ -2884,6 +2924,23 @@ % \end{macro} % \end{macro} % +% \subsection{Diagnostic wrapper functions} +% +% \begin{macro}{\kernel_register_show:N,\kernel_register_show:c} +% \begin{macrocode} +\cs_new_nopar:Npn \kernel_register_show:N #1 { + \cs_if_exist:NTF #1 + { + \tex_showthe:D #1 + } + { + \msg_kernel_bug:x {Register~ `\token_to_str:N #1'~ is~ not~ defined.} + } +} +\cs_new_nopar:Npn \kernel_register_show:c { \exp_args:Nc \int_show:N } +% \end{macrocode} +% \end{macro} +% % % \subsection{Engine specific definitions} % @@ -3140,14 +3197,14 @@ % \begin{macro}{\cs_new_protected:Nx} % \begin{macro}{\cs_new_protected_nopar:Nn} % \begin{macro}{\cs_new_protected_nopar:Nx} -% \begin{macro}{\cs_gnew:Nn} -% \begin{macro}{\cs_gnew:Nx} -% \begin{macro}{\cs_gnew_nopar:Nn} -% \begin{macro}{\cs_gnew_nopar:Nx} -% \begin{macro}{\cs_gnew_protected:Nn} -% \begin{macro}{\cs_gnew_protected:Nx} -% \begin{macro}{\cs_gnew_protected_nopar:Nn} -% \begin{macro}{\cs_gnew_protected_nopar:Nx} +% \begin{macro}{\cs_new_local:Nn} +% \begin{macro}{\cs_new_local:Nx} +% \begin{macro}{\cs_new_local_nopar:Nn} +% \begin{macro}{\cs_new_local_nopar:Nx} +% \begin{macro}{\cs_new_local_protected:Nn} +% \begin{macro}{\cs_new_local_protected:Nx} +% \begin{macro}{\cs_new_local_protected_nopar:Nn} +% \begin{macro}{\cs_new_local_protected_nopar:Nx} % \begin{macrocode} \cs_tmp:w {new}{Nn}{Npn} \cs_tmp:w {new}{Nx}{Npx} @@ -3157,14 +3214,14 @@ \cs_tmp:w {new_protected}{Nx}{Npx} \cs_tmp:w {new_protected_nopar}{Nn}{Npn} \cs_tmp:w {new_protected_nopar}{Nx}{Npx} -\cs_tmp:w {gnew}{Nn}{Npn} -\cs_tmp:w {gnew}{Nx}{Npx} -\cs_tmp:w {gnew_nopar}{Nn}{Npn} -\cs_tmp:w {gnew_nopar}{Nx}{Npx} -\cs_tmp:w {gnew_protected}{Nn}{Npn} -\cs_tmp:w {gnew_protected}{Nx}{Npx} -\cs_tmp:w {gnew_protected_nopar}{Nn}{Npn} -\cs_tmp:w {gnew_protected_nopar}{Nx}{Npx} +\cs_tmp:w {new_local}{Nn}{Npn} +\cs_tmp:w {new_local}{Nx}{Npx} +\cs_tmp:w {new_local_nopar}{Nn}{Npn} +\cs_tmp:w {new_local_nopar}{Nx}{Npx} +\cs_tmp:w {new_local_protected}{Nn}{Npn} +\cs_tmp:w {new_local_protected}{Nx}{Npx} +\cs_tmp:w {new_local_protected_nopar}{Nn}{Npn} +\cs_tmp:w {new_local_protected_nopar}{Nx}{Npx} % \end{macrocode} % \end{macro} % \end{macro} @@ -3259,14 +3316,14 @@ % \begin{macro}{\cs_new_protected:cx} % \begin{macro}{\cs_new_protected_nopar:cn} % \begin{macro}{\cs_new_protected_nopar:cx} -% \begin{macro}{\cs_gnew:cn} -% \begin{macro}{\cs_gnew:cx} -% \begin{macro}{\cs_gnew_nopar:cn} -% \begin{macro}{\cs_gnew_nopar:cx} -% \begin{macro}{\cs_gnew_protected:cn} -% \begin{macro}{\cs_gnew_protected:cx} -% \begin{macro}{\cs_gnew_protected_nopar:cn} -% \begin{macro}{\cs_gnew_protected_nopar:cx} +% \begin{macro}{\cs_new_local:cn} +% \begin{macro}{\cs_new_local:cx} +% \begin{macro}{\cs_new_local_nopar:cn} +% \begin{macro}{\cs_new_local_nopar:cx} +% \begin{macro}{\cs_new_local_protected:cn} +% \begin{macro}{\cs_new_local_protected:cx} +% \begin{macro}{\cs_new_local_protected_nopar:cn} +% \begin{macro}{\cs_new_local_protected_nopar:cx} % \begin{macrocode} \cs_tmp:w {new}{cn}{Npn} \cs_tmp:w {new}{cx}{Npx} @@ -3276,14 +3333,14 @@ \cs_tmp:w {new_protected}{cx}{Npx} \cs_tmp:w {new_protected_nopar}{cn}{Npn} \cs_tmp:w {new_protected_nopar}{cx}{Npx} -\cs_tmp:w {gnew}{cn}{Npn} -\cs_tmp:w {gnew}{cx}{Npx} -\cs_tmp:w {gnew_nopar}{cn}{Npn} -\cs_tmp:w {gnew_nopar}{cx}{Npx} -\cs_tmp:w {gnew_protected}{cn}{Npn} -\cs_tmp:w {gnew_protected}{cx}{Npx} -\cs_tmp:w {gnew_protected_nopar}{cn}{Npn} -\cs_tmp:w {gnew_protected_nopar}{cx}{Npx} +\cs_tmp:w {new_local}{cn}{Npn} +\cs_tmp:w {new_local}{cx}{Npx} +\cs_tmp:w {new_local_nopar}{cn}{Npn} +\cs_tmp:w {new_local_nopar}{cx}{Npx} +\cs_tmp:w {new_local_protected}{cn}{Npn} +\cs_tmp:w {new_local_protected}{cx}{Npx} +\cs_tmp:w {new_local_protected_nopar}{cn}{Npn} +\cs_tmp:w {new_local_protected_nopar}{cx}{Npx} % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/source/latex/expl3/l3box.dtx b/Master/texmf-dist/source/latex/expl3/l3box.dtx index 0031dfc9f4f..652decb8a9e 100644 --- a/Master/texmf-dist/source/latex/expl3/l3box.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3box.dtx @@ -36,7 +36,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3box.dtx 1867 2010-03-23 13:03:12Z will $ +\GetIdInfo$Id: l3box.dtx 1902 2010-05-13 14:58:53Z mittelba $ {L3 Experimental Box module} %\iffalse %<*driver> @@ -530,8 +530,8 @@ } \cs_new_protected:Npn \box_new_local:N #1 { \chk_if_free_cs:N #1 - \int_compare:nNnTF - \tex_currentgrouplevel:D = 0 + \intexpr_compare:nNnTF + \etex_currentgrouplevel:D = 0 \newbox \locbox #1 } @@ -649,10 +649,10 @@ % \begin{macro}{\box_move_down:nn} % Move box material in different directions. % \begin{macrocode} -\cs_new:Npn \box_move_left:nn #1#2{\tex_moveleft:D\dim_eval:n{#1}{#2}} -\cs_new:Npn \box_move_right:nn #1#2{\tex_moveright:D\dim_eval:n{#1}{#2}} -\cs_new:Npn \box_move_up:nn #1#2{\tex_raise:D\dim_eval:n{#1}{#2}} -\cs_new:Npn \box_move_down:nn #1#2{\tex_lower:D\dim_eval:n{#1}{#2}} +\cs_new:Npn \box_move_left:nn #1#2{\tex_moveleft:D\dim_eval:n{#1} #2} +\cs_new:Npn \box_move_right:nn #1#2{\tex_moveright:D\dim_eval:n{#1} #2} +\cs_new:Npn \box_move_up:nn #1#2{\tex_raise:D\dim_eval:n{#1} #2} +\cs_new:Npn \box_move_down:nn #1#2{\tex_lower:D\dim_eval:n{#1} #2} % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/source/latex/expl3/l3doc.dtx b/Master/texmf-dist/source/latex/expl3/l3doc.dtx index 3aad9e48257..e56cd330ecc 100644 --- a/Master/texmf-dist/source/latex/expl3/l3doc.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3doc.dtx @@ -77,7 +77,7 @@ Do not distribute a modified version of this file. % \end{macrocode} % %<*driver|class> -\GetIdInfo$Id: l3doc.dtx 1786 2010-02-09 12:52:45Z joseph $ +\GetIdInfo$Id: l3doc.dtx 1890 2010-04-11 03:37:15Z will $ {L3 Experimental documentation class} %</driver|class> % @@ -673,7 +673,7 @@ Do not distribute a modified version of this file. % \begin{macrocode} \group_begin: \char_make_active:N \< -\cs_gnew_nopar:Npn \function { +\cs_new_nopar:Npn \function { \char_make_active:N \< \cs_set_eq:NN < \doc_open_meta:n \group_begin: @@ -844,12 +844,12 @@ Do not distribute a modified version of this file. % \begin{macrocode} \group_begin: \tl_map_inline:nn {0123456789} { \char_make_active:N #1 } - \cs_gnew:Npn \doc_open_meta:n { + \cs_new:Npn \doc_open_meta:n { \group_begin: \tl_map_function:nN {0123456789} \doc_assign_num:n \doc_close_meta:w } - \cs_gnew:Npn \Arg { + \cs_new:Npn \Arg { \texttt{ \char`\{ } \group_begin: \tl_map_function:nN {0123456789} \doc_assign_num:n diff --git a/Master/texmf-dist/source/latex/expl3/l3int.dtx b/Master/texmf-dist/source/latex/expl3/l3int.dtx index df635a93fe3..4af558c3a47 100644 --- a/Master/texmf-dist/source/latex/expl3/l3int.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3int.dtx @@ -36,7 +36,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3int.dtx 1867 2010-03-23 13:03:12Z will $ +\GetIdInfo$Id: l3int.dtx 1893 2010-04-11 12:54:05Z will $ {L3 Experimental Integer module} %\iffalse %<*driver> @@ -473,8 +473,8 @@ } \cs_new_protected_nopar:Npn \int_new_local:N #1 { \chk_if_free_cs:N #1 - \int_compare:nNnTF - \tex_currentgrouplevel:D = 0 + \intexpr_compare:nNnTF + \etex_currentgrouplevel:D = 0 \newcount \loccount #1 } @@ -668,10 +668,9 @@ % % \begin{macro}{\int_show:N} % \begin{macro}{\int_show:c} -% Diagnostics. % \begin{macrocode} -\cs_new_eq:NN \int_show:N \tex_showthe:D -\cs_new_nopar:Npn \int_show:c {\exp_args:Nc \int_show:N } +\cs_new_eq:NN \int_show:N \kernel_register_show:N +\cs_new_eq:NN \int_show:c \kernel_register_show:c % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/source/latex/expl3/l3io.dtx b/Master/texmf-dist/source/latex/expl3/l3io.dtx index ba99da22abe..cb11e46f2ca 100644 --- a/Master/texmf-dist/source/latex/expl3/l3io.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3io.dtx @@ -36,7 +36,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3io.dtx 1853 2010-03-21 09:11:08Z joseph $ +\GetIdInfo$Id: l3io.dtx 1890 2010-04-11 03:37:15Z will $ {L3 Experimental i/o module} %\iffalse %<*driver> @@ -503,11 +503,11 @@ % variable types. % \begin{macrocode} \cs_new_protected_nopar:Npn \iow_new:N #1 { - \cs_gnew_eq:NN #1 \c_iow_log_stream + \cs_new_eq:NN #1 \c_iow_log_stream } \cs_generate_variant:Nn \iow_new:N { c } \cs_new_protected_nopar:Npn \ior_new:N #1 { - \cs_gnew_eq:NN #1 \c_ior_log_stream + \cs_new_eq:NN #1 \c_ior_log_stream } \cs_generate_variant:Nn \ior_new:N { c } % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/expl3/l3keys.dtx b/Master/texmf-dist/source/latex/expl3/l3keys.dtx index 5cea3f4d1e5..6fdeb8b7cae 100644 --- a/Master/texmf-dist/source/latex/expl3/l3keys.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3keys.dtx @@ -35,7 +35,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3keys.dtx 1863 2010-03-22 20:15:06Z joseph $ +\GetIdInfo$Id: l3keys.dtx 1894 2010-04-13 07:37:59Z joseph $ {L3 Experimental key-value support} %\iffalse %<*driver> @@ -1564,14 +1564,14 @@ Check~that~you~have~spelled~the~key~name~correctly. } \msg_kernel_new:nnnn { keys } { property-requires-value } - { The property '#1' requires a value. } + { The~property~'#1'~requires~a~value. } { \l_msg_coding_error_text_tl LaTeX~was~asked~to~set~property~'#2'~for~key~'#1'.\\ No~value~was~given~for~the~property,~and~one~is~required. } \msg_kernel_new:nnnn { keys } { property-unknown } - { The key property '#1' is unknown. } + { The~key~property~'#1'~is~unknown. } { \l_msg_coding_error_text_tl LaTeX~has~been~asked~to~set~the~property~'#1'~for~key~'#2':\\ diff --git a/Master/texmf-dist/source/latex/expl3/l3keyval.dtx b/Master/texmf-dist/source/latex/expl3/l3keyval.dtx index 086827188f4..54a89df8955 100644 --- a/Master/texmf-dist/source/latex/expl3/l3keyval.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3keyval.dtx @@ -35,7 +35,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3keyval.dtx 1872 2010-03-24 07:53:45Z mittelba $ +\GetIdInfo$Id: l3keyval.dtx 1890 2010-04-11 03:37:15Z will $ {L3 Experimental keyval processing} %\iffalse %<*driver> @@ -443,7 +443,7 @@ \char_set_catcode:nn{`\Q}{3} % \end{macrocode} % \begin{macrocode} -\cs_gnew:Npn\KV_remove_surrounding_spaces:nw#1#2\q_nil{ +\cs_new:Npn\KV_remove_surrounding_spaces:nw#1#2\q_nil{ % \end{macrocode} % The idea in this processing is to use a Q with strange catcode to % remove a trailing space. But first, how to get this expansion going? @@ -481,7 +481,7 @@ % |\KV_remove_surrounding_spaces_auxii:w| to work properly we need to % put back a Q first. % \begin{macrocode} -\cs_gnew:Npn\KV_remove_surrounding_spaces_auxi:w#1~Q{ +\cs_new:Npn\KV_remove_surrounding_spaces_auxi:w#1~Q{ \KV_remove_surrounding_spaces_auxii:w #1 Q } % \end{macrocode} @@ -489,14 +489,14 @@ % taken care of by the function used to initiate the expansion. Simply % return the argument before the funny Q. % \begin{macrocode} -\cs_gnew:Npn\KV_remove_surrounding_spaces_auxii:w#1Q#2{#1} +\cs_new:Npn\KV_remove_surrounding_spaces_auxii:w#1Q#2{#1} % \end{macrocode} % % Here are some specialized versions of the above. They do exactly % what we want in one go. First trim spaces from the value and then % put the result surrounded in braces onto |\l_KV_parse_tl|. % \begin{macrocode} -\cs_gnew_protected:Npn\KV_add_value_element:w\q_stop#1\q_nil{ +\cs_new_protected:Npn\KV_add_value_element:w\q_stop#1\q_nil{ \tl_set:Nf\l_KV_currval_tl { \KV_remove_surrounding_spaces_auxi:w \exp_not:N#1Q~Q } @@ -508,7 +508,7 @@ % When storing the key we firstly remove spaces plus the prepended % |\q_no_value|. % \begin{macrocode} -\cs_gnew_protected:Npn\KV_set_key_element:w#1\q_nil{ +\cs_new_protected:Npn\KV_set_key_element:w#1\q_nil{ \tl_set:Nf\l_KV_currkey_tl { \exp_last_unbraced:NNo \KV_remove_surrounding_spaces_auxi:w diff --git a/Master/texmf-dist/source/latex/expl3/l3seq.dtx b/Master/texmf-dist/source/latex/expl3/l3seq.dtx index 6e72397646d..f9d6f82e283 100644 --- a/Master/texmf-dist/source/latex/expl3/l3seq.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3seq.dtx @@ -36,7 +36,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3seq.dtx 1857 2010-03-21 21:32:09Z joseph $ +\GetIdInfo$Id: l3seq.dtx 1879 2010-03-29 17:48:38Z mittelba $ {L3 Experimental sequences and stacks} %\iffalse %<*driver> @@ -137,13 +137,16 @@ % \end{function} % % \begin{function}{% +% \seq_concat:NNN | +% \seq_concat:ccc | % \seq_gconcat:NNN | % \seq_gconcat:ccc | % } % \begin{syntax} +% "\seq_concat:NNN" <seq1> <seq2> <seq3> % "\seq_gconcat:NNN" <seq1> <seq2> <seq3> % \end{syntax} -% Function that conatenates <seq2> and <seq3> and globally assigns the +% Function that conatenates <seq2> and <seq3> and locally or globally assigns the % result to <seq1>. % \end{function} % @@ -215,12 +218,6 @@ % of <sequence>. % \end{function} % -% \begin{function}{% -% \seq_gput_right:Nc | -% } -% Variant of the above used in the |xor| package. -% Will probably be moved soon to that package. (Sep 2008) -% \end{function} % % \section{Working with sequences} % @@ -542,6 +539,17 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\seq_concat:NNN,\seq_concat:ccc} +% |\seq_concat:NNN| \m{seq~1} \m{seq~2} \m{seq~3} will locally +% assign \m{seq~1} the concatenation of \m{seq~2} and \m{seq~3}. +% \begin{macrocode} +\cs_new_protected_nopar:Npn \seq_concat:NNN #1#2#3 { + \tl_set:Nx #1 { \exp_not:V #2 \exp_not:V #3 } +} +\cs_generate_variant:Nn \seq_concat:NNN {ccc} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\seq_gconcat:NNN,\seq_gconcat:ccc} % |\seq_gconcat:NNN| \m{seq~1} \m{seq~2} \m{seq~3} will globally % assign \m{seq~1} the concatenation of \m{seq~2} and \m{seq~3}. @@ -805,12 +813,6 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\seq_gput_right:Nc} -% TODO: move to |xor| (Sep 2008) -% \begin{macrocode} -\cs_generate_variant:Nn \seq_gput_right:Nn {Nc} -% \end{macrocode} -% \end{macro} % % \subsection{Mapping} % diff --git a/Master/texmf-dist/source/latex/expl3/l3skip.dtx b/Master/texmf-dist/source/latex/expl3/l3skip.dtx index bbb3acd59a9..055ed886304 100644 --- a/Master/texmf-dist/source/latex/expl3/l3skip.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3skip.dtx @@ -1,5 +1,5 @@ % \iffalse -%% File: l3skip.dtx Copyright (C) 2005-2008 Frank Mittelbach, LaTeX3 project +%% File: l3skip.dtx Copyright (C) 2005-2010 Frank Mittelbach, 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 @@ -36,7 +36,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3skip.dtx 1867 2010-03-23 13:03:12Z will $ +\GetIdInfo$Id: l3skip.dtx 1892 2010-04-11 08:59:45Z will $ {L3 Experimental skip registers} %\iffalse %<*driver> @@ -251,7 +251,7 @@ % \begin{variable}{% % \c_zero_skip | % } -% Set of constants denoting useful values. +% Constants denoting a zero skip. % \end{variable} % % \begin{variable}{% @@ -572,8 +572,8 @@ } \cs_new_protected_nopar:Npn \skip_new_local:N #1 { \chk_if_free_cs:N #1 - \int_compare:nNnTF - \tex_currentgrouplevel:D = 0 + \intexpr_compare:nNnTF + \etex_currentgrouplevel:D = 0 \newskip \locskip #1 } @@ -863,8 +863,8 @@ } \cs_new_protected_nopar:Npn \dim_new_local:N #1 { \chk_if_free_cs:N #1 - \int_compare:nNnTF - \tex_currentgrouplevel:D = 0 + \intexpr_compare:nNnTF + \etex_currentgrouplevel:D = 0 \newdimen \locdimen #1 } @@ -1083,8 +1083,8 @@ } \cs_new_protected_nopar:Npn \muskip_new_local:N #1 { \chk_if_free_cs:N #1 - \int_compare:nNnTF - \tex_currentgrouplevel:D = 0 + \intexpr_compare:nNnTF + \etex_currentgrouplevel:D = 0 \newmuskip \locmuskip #1 } diff --git a/Master/texmf-dist/source/latex/expl3/l3tl.dtx b/Master/texmf-dist/source/latex/expl3/l3tl.dtx index 4b38de0d0f1..5c5bc8990be 100644 --- a/Master/texmf-dist/source/latex/expl3/l3tl.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3tl.dtx @@ -36,7 +36,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3tl.dtx 1873 2010-03-24 08:32:54Z joseph $ +\GetIdInfo$Id: l3tl.dtx 1905 2010-05-19 07:45:31Z joseph $ {L3 Experimental Token Lists} %\iffalse %<*driver> @@ -86,18 +86,30 @@ % \begin{syntax} % "\tl_new:Nn" <\tlvar> \Arg{initial token list} % \end{syntax} -% Defines <\tlvar> to be a new variable to store a token list. +% Defines <\tlvar> globally to be a new variable to store a token list. % <initial token list> is the initial value of <\tlvar>. This % makes it possible to assign values to a constant token list variable. % % The form "\tl_new:N" initializes the token list variable with an empty value. % \end{function} -% +% +% \begin{function}{\tl_new_local:N | +% \tl_new_local:c | +% \tl_new_local:Nn | +% \tl_new_local:cn | +% \tl_new_local:Nx } +% \begin{syntax} +% "\tl_new_local:Nn" <\tlvar> \Arg{initial token list} +% \end{syntax} +% Locally defines <\tlvar> to be a new variable to store a token list. +% It will only exist while the current group is open. +% \end{function} +% % \begin{function}{\tl_const:Nn} % \begin{syntax} % "\tl_const:Nn" \meta{\tlvar} \Arg{token list} % \end{syntax} -% Defines \meta{\tlvar} as a constant expanding to \meta{token list}. +% Defines \meta{\tlvar} as a global constant expanding to \meta{token list}. % The name of the constant must be free when the constant is created. % \end{function} % @@ -749,15 +761,15 @@ % \tl_head_iii:w / (EXP) % } % \begin{syntax} -% "\tl_head:n" "{" <token1><token2>...<token\,$\sb n$> "}" \\ -% "\tl_tail:n" "{" <token1><token2>...<token\,$\sb n$> "}" \\ -% "\tl_head:w" <token1><token2>...<token\,$\sb n$> "\q_nil" +% "\tl_head:n" "{" <token1><token2>...<token\,$\sb k$> "}" \\ +% "\tl_tail:n" "{" <token1><token2>...<token\,$\sb k$> "}" \\ +% "\tl_head:w" <token1><token2>...<token\,$\sb k$> "\q_nil" % \end{syntax} -% These functions return either the head or the tail of a list, thus in +% These functions return either the head or the tail from a list of tokens, thus in % the above example "\tl_head:n" would return <token1> and "\tl_tail:n" -% would return <token2>\dots<token\,$\sb n$>. "\tl_head_iii:n" returns the first -% three tokens. The ":w" versions require some care as they use a -% delimited argument internally. +% would return <token2>\dots<token\,$\sb k$>. "\tl_head_iii:n" returns the first +% three tokens. The ":w" versions require some care as they expect the token +% list to be delimited by "\q_nil". % \begin{texnote} % These are the Lisp functions "car" and "cdr" but with \LaTeX3 names. % \end{texnote} @@ -874,7 +886,42 @@ % \end{macro} % \end{macro} % \end{macro} -% +% +% \begin{macro}{\tl_new_local:N} +% \begin{macro}{\tl_new_local:c} +% \begin{macro}{\tl_new_local:Nn} +% \begin{macro}{\tl_new_local:cn} +% \begin{macro}{\tl_new_local:Nx} +% \begin{macrocode} +\cs_new_protected:Npn \tl_new_local:Nn #1#2{ + \chk_if_free_cs:N #1 +% \end{macrocode} +% If checking we don't allow constants to be defined. +% \begin{macrocode} +%<*check> + \chk_var_or_const:N #1 +%</check> +% \end{macrocode} +% Otherwise any variable type is allowed. +% \begin{macrocode} + \cs_set_nopar:Npn #1{#2} +} +\cs_generate_variant:Nn \tl_new_local:Nn {cn} +\cs_new_protected:Npn \tl_new_local:Nx #1#2{ + \chk_if_free_cs:N #1 +%<check> \chk_var_or_const:N #1 + \cs_set_nopar:Npx #1{#2} +} +\cs_new_protected_nopar:Npn \tl_new_local:N #1{\tl_new_local:Nn #1{}} +\cs_new_protected_nopar:Npn \tl_new_local:c #1{\tl_new_local:cn {#1}{}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% %\begin{macro}{\tl_const:Nn} % For creating constant token lists: there is not actually anything here % that cannot be achieved using \cs{tl_new:N} and \cs{tl_set:Nn} @@ -2324,6 +2371,130 @@ % \end{macro} % \end{macro} % \end{macro} +% +%\begin{macro}{\_tl_check_exists:N} +% When used as a package, there is an option to be picky and to +% check definitions exist. The message text for this is created later, +% as the mechanism is not yet in place. +% \begin{macrocode} +%<*package> +\tex_ifodd:D \@l@expl@check@declarations@bool \scan_stop: + \cs_set_protected:Npn \_tl_check_exists:N #1 + { + \cs_if_exist:NF #1 + { + \msg_kernel_error:nnx { check } { non-declared-variable } + { \token_to_str:N #1 } + } + } + \cs_set_protected:Npn \tl_set:Nn #1#2 + { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:n {#2} } + } + \cs_set_protected:Npn \tl_set:Nx #1#2 + { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 {#2} + } + \cs_set_protected:Npn \tl_gset:Nn #1#2 + { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } + } + \cs_set_protected:Npn \tl_gset:Nx #1#2 + { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 {#2} + } + \cs_set_protected:Npn \tl_set_eq:NN #1#2 + { + \_tl_check_exists:N #1 + \_tl_check_exists:N #2 + \cs_set_eq:NN #1 #2 + } + \cs_set_protected:Npn \tl_gset_eq:NN #1#2 + { + \_tl_check_exists:N #1 + \_tl_check_exists:N #2 + \cs_gset_eq:NN #1 #2 + } + \cs_set_protected:Npn \tl_put_right:Nn #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:n {#2} } + } + \cs_set_protected:Npn \tl_put_right:NV #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:V #2 } + } + \cs_set_protected:Npn \tl_put_right:Nv #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:v {#2} } + } + \cs_set_protected:Npn \tl_put_right:No #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:o {#2} } + } + \cs_set_protected:Npn \tl_put_right:Nx #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 #2 } + } + \cs_set_protected:Npn \tl_gput_right:Nn #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #1 \exp_not:n {#2} } + } + \cs_set_protected:Npn \tl_gput_right:NV #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #1 \exp_not:V #2 } + } + \cs_set_protected:Npn \tl_gput_right:Nv #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #1 \exp_not:v {#2} } + } + \cs_set_protected:Npn \tl_gput_right:Nx #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #1 #2 } + } + \cs_set_protected:Npn \tl_put_left:Nn #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:n {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_put_left:NV #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #2 \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_put_left:Nv #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:v {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_put_left:No #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:o {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_put_left:Nx #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { #2 \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_gput_left:Nn #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:n {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_gput_left:NV #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #2 \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_gput_left:Nv #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:v {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_gput_left:Nx #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { #2 \exp_not:V #1 } + } +\tex_fi:D +%</package> +% \end{macrocode} +%\end{macro} % % Show token usage: % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/expl3/l3token.dtx b/Master/texmf-dist/source/latex/expl3/l3token.dtx index 6c48ab422d4..14d84cb0122 100644 --- a/Master/texmf-dist/source/latex/expl3/l3token.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3token.dtx @@ -1,5 +1,5 @@ % \iffalse -%% File: l3token.dtx Copyright (C) 2005-2009 LaTeX3 project +%% File: l3token.dtx Copyright (C) 2005-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 @@ -35,7 +35,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3token.dtx 1857 2010-03-21 21:32:09Z joseph $ +\GetIdInfo$Id: l3token.dtx 1890 2010-04-11 03:37:15Z will $ {L3 Experimental token investigation and manipulation} %\iffalse %<*driver> @@ -930,10 +930,9 @@ % \subsection{Generic tokens} % % \begin{macro}{\token_new:Nn} -% Creates a new token. (Will: why can't this just be -% "\cs_new_eq:NN \token_new:Nn \cs_gnew_eq:NN"? Seriously, that doesn't work!) +% Creates a new token. % \begin{macrocode} -\cs_new_protected_nopar:Npn \token_new:Nn #1#2 {\cs_gnew_eq:NN #1#2} +\cs_new_protected_nopar:Npn \token_new:Nn #1#2 {\cs_new_eq:NN #1#2} % \end{macrocode} % \end{macro} % diff --git a/Master/texmf-dist/source/latex/expl3/l3toks.dtx b/Master/texmf-dist/source/latex/expl3/l3toks.dtx index 3b3502d0ea3..ef09b0132a8 100644 --- a/Master/texmf-dist/source/latex/expl3/l3toks.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3toks.dtx @@ -1,5 +1,5 @@ % \iffalse -%% File: l3toks.dtx Copyright (C) 1990-2009 LaTeX3 project +%% File: l3toks.dtx Copyright (C) 1990-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 @@ -36,7 +36,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3toks.dtx 1867 2010-03-23 13:03:12Z will $ +\GetIdInfo$Id: l3toks.dtx 1892 2010-04-11 08:59:45Z will $ {L3 Experimental Token Registers} %\iffalse %<*driver> @@ -140,10 +140,7 @@ % \begin{texnote} % "\toks_set:Nn" could have been specified in plain \TeX{} by <toks> "=" % \Arg{token list} but all other functions have no counterpart in -% plain \TeX. Additionally the functions above the global variants described -% below will check for correct -% local and global assignments, something that isn't available in plain -% \TeX. +% plain \TeX. % \end{texnote} % \end{function} % @@ -371,8 +368,8 @@ } \cs_new_protected_nopar:Npn \toks_new_local:N #1 { \chk_if_free_cs:N #1 - \int_compare:nNnTF - \tex_currentgrouplevel:D = 0 + \intexpr_compare:nNnTF + \etex_currentgrouplevel:D = 0 \newtoks \loctoks #1 } |