diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-31 00:04:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-31 00:04:47 +0000 |
commit | 3ab55a61f6f8d2218a8f3175bc7481ce162b60d3 (patch) | |
tree | f606e0c2117a8058213441400e50ba25400ba94a /Master/texmf-dist/tex/latex/expl3/l3basics.sty | |
parent | 035ea73193af75f6ade46e306603e61d82b24950 (diff) |
expl3 1881 (30mar10)
git-svn-id: svn://tug.org/texlive/trunk@17631 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3basics.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/expl3/l3basics.sty | 83 |
1 files changed, 51 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3basics.sty b/Master/texmf-dist/tex/latex/expl3/l3basics.sty index 21d986edb7d..1934eccb2d8 100644 --- a/Master/texmf-dist/tex/latex/expl3/l3basics.sty +++ b/Master/texmf-dist/tex/latex/expl3/l3basics.sty @@ -48,7 +48,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3basics.dtx 1700 2009-11-04 21:15:58Z joseph $ +\GetIdInfo$Id: l3basics.dtx 1853 2010-03-21 09:11:08Z joseph $ {L3 Experimental basic definitions} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} @@ -133,6 +133,13 @@ \pref_protected:D \pref_long:D \cs_gset_nopar:Npx } \cs_set:Npn \use:c #1 { \cs:w#1\cs_end: } +\cs_set_protected:Npn \use:x #1 { + \group_begin: + \cs_set:Npx \cs_tmp: {#1} + \exp_args:wN + \group_end: + \cs_tmp: +} \cs_set:Npn \use:n #1 {#1} \cs_set:Npn \use:nn #1#2 {#1#2} \cs_set:Npn \use:nnn #1#2#3 {#1#2#3} @@ -169,60 +176,60 @@ \cs_set:Npn \exp_args:Nc #1#2{\exp_after:wN#1\cs:w#2\cs_end:} \cs_set:Npn \prg_return_true: { \exp_after:wN\if_true:\tex_romannumeral:D } \cs_set:Npn \prg_return_false: {\exp_after:wN\if_false:\tex_romannumeral:D } -\cs_set:Npn \prg_set_conditional:Npnn #1{ +\cs_set_protected:Npn \prg_set_conditional:Npnn #1{ \prg_get_parm_aux:nw{ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn \cs_set:Npn {parm} } } -\cs_set:Npn \prg_new_conditional:Npnn #1{ +\cs_set_protected:Npn \prg_new_conditional:Npnn #1{ \prg_get_parm_aux:nw{ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn \cs_new:Npn {parm} } } -\cs_set:Npn \prg_set_protected_conditional:Npnn #1{ +\cs_set_protected:Npn \prg_set_protected_conditional:Npnn #1{ \prg_get_parm_aux:nw{ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn \cs_set_protected:Npn {parm} } } -\cs_set:Npn \prg_new_protected_conditional:Npnn #1{ +\cs_set_protected:Npn \prg_new_protected_conditional:Npnn #1{ \prg_get_parm_aux:nw{ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn \cs_new_protected:Npn {parm} } } -\cs_set:Npn \prg_set_conditional:Nnn #1{ +\cs_set_protected:Npn \prg_set_conditional:Nnn #1{ \exp_args:Nnf \prg_get_count_aux:nn{ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn \cs_set:Npn {count} }{\cs_get_arg_count_from_signature:N #1} } -\cs_set:Npn \prg_new_conditional:Nnn #1{ +\cs_set_protected:Npn \prg_new_conditional:Nnn #1{ \exp_args:Nnf \prg_get_count_aux:nn{ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn \cs_new:Npn {count} }{\cs_get_arg_count_from_signature:N #1} } -\cs_set:Npn \prg_set_protected_conditional:Nnn #1{ +\cs_set_protected:Npn \prg_set_protected_conditional:Nnn #1{ \exp_args:Nnf \prg_get_count_aux:nn{ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn \cs_set_protected:Npn {count} }{\cs_get_arg_count_from_signature:N #1} } -\cs_set:Npn \prg_new_protected_conditional:Nnn #1{ +\cs_set_protected:Npn \prg_new_protected_conditional:Nnn #1{ \exp_args:Nnf \prg_get_count_aux:nn{ \cs_split_function:NN #1 \prg_generate_conditional_aux:nnNNnnnn \cs_new_protected:Npn {count} }{\cs_get_arg_count_from_signature:N #1} } -\cs_set:Npn \prg_set_eq_conditional:NNn #1#2#3 { +\cs_set_protected:Npn \prg_set_eq_conditional:NNn #1#2#3 { \prg_set_eq_conditional_aux:NNNn \cs_set_eq:cc #1#2 {#3} } -\cs_set:Npn \prg_new_eq_conditional:NNn #1#2#3 { +\cs_set_protected:Npn \prg_new_eq_conditional:NNn #1#2#3 { \prg_set_eq_conditional_aux:NNNn \cs_new_eq:cc #1#2 {#3} } \cs_set:Npn \prg_get_count_aux:nn #1#2 {#1{#2}} @@ -389,18 +396,18 @@ \cs_set_eq:NwN \c_minus_one\m@ne \tex_chardef:D \c_sixteen = 16~ \tex_chardef:D \c_zero = 0~ -\cs_set_nopar:Npn \iow_log:x { +\cs_set_protected_nopar:Npn \iow_log:x { \tex_immediate:D \iow_shipout_x:Nn \c_minus_one } -\cs_set_nopar:Npn \iow_term:x { +\cs_set_protected_nopar:Npn \iow_term:x { \tex_immediate:D \iow_shipout_x:Nn \c_sixteen } -\cs_set_nopar:Npn \msg_kernel_bug:x #1 { +\cs_set_protected_nopar:Npn \msg_kernel_bug:x #1 { \iow_term:x { This~is~a~LaTeX~bug:~check~coding! } \tex_errmessage:D {#1} } \cs_set:Npn \cs_record_meaning:N #1{} -\cs_set_nopar:Npn \chk_if_free_cs:N #1{ +\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'~ @@ -412,15 +419,19 @@ \iow_log:x{Defining~\token_to_str:N #1~on~ line~\tex_the:D \tex_inputlineno:D} } -\cs_set_nopar:Npn \chk_if_free_cs:c { \exp_args:Nc \chk_if_free_cs:N } -\cs_set_nopar:Npn \chk_if_exist_cs:N #1 { +\cs_set_protected_nopar:Npn \chk_if_free_cs:c { + \exp_args:Nc \chk_if_free_cs:N +} +\cs_set_protected_nopar:Npn \chk_if_exist_cs:N #1 { \cs_if_exist:NF #1 { \msg_kernel_bug:x {Command~ `\token_to_str:N #1'~ not~ yet~ defined!} } } -\cs_set_nopar:Npn \chk_if_exist_cs:c {\exp_args:Nc \chk_if_exist_cs:N } +\cs_set_protected_nopar:Npn \chk_if_exist_cs:c { + \exp_args:Nc \chk_if_exist_cs:N +} \prg_set_conditional:Npnn \str_if_eq:nn #1#2{p}{ \str_if_eq_p_aux:w #1\scan_stop:\\#2\scan_stop:\\ } @@ -518,29 +529,37 @@ \cs_set_nopar:cpn{use_9_parameter:}{ {##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}} \cs_set_protected:Npn \cs_set_eq:NN #1 { \cs_set_eq:NwN #1=~ } -\cs_set_nopar:Npn \cs_set_eq:cN { \exp_args:Nc \cs_set_eq:NN } -\cs_set_nopar:Npn \cs_set_eq:Nc { \exp_args:NNc \cs_set_eq:NN } -\cs_set_nopar:Npn \cs_set_eq:cc { \exp_args:Ncc \cs_set_eq:NN } +\cs_set_protected_nopar:Npn \cs_set_eq:cN { \exp_args:Nc \cs_set_eq:NN } +\cs_set_protected_nopar:Npn \cs_set_eq:Nc { \exp_args:NNc \cs_set_eq:NN } +\cs_set_protected_nopar:Npn \cs_set_eq:cc { \exp_args:Ncc \cs_set_eq:NN } \cs_new_protected:Npn \cs_new_eq:NN #1 { \chk_if_free_cs:N #1 \cs_set_eq:NN #1 } -\cs_new_nopar:Npn \cs_new_eq:cN { \exp_args:Nc \cs_new_eq:NN } -\cs_new_nopar:Npn \cs_new_eq:Nc { \exp_args:NNc \cs_new_eq:NN } -\cs_new_nopar:Npn \cs_new_eq:cc { \exp_args:Ncc \cs_new_eq:NN } +\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 } +\cs_new_protected_nopar:Npn \cs_new_eq:cc { \exp_args:Ncc \cs_new_eq:NN } \cs_new_protected:Npn \cs_gset_eq:NN { \pref_global:D \cs_set_eq:NN } -\cs_new_nopar:Npn \cs_gset_eq:Nc { \exp_args:NNc \cs_gset_eq:NN } -\cs_new_nopar:Npn \cs_gset_eq:cN { \exp_args:Nc \cs_gset_eq:NN } -\cs_new_nopar:Npn \cs_gset_eq:cc { \exp_args:Ncc \cs_gset_eq:NN } +\cs_new_protected_nopar:Npn \cs_gset_eq:Nc { \exp_args:NNc \cs_gset_eq:NN } +\cs_new_protected_nopar:Npn \cs_gset_eq:cN { \exp_args:Nc \cs_gset_eq:NN } +\cs_new_protected_nopar:Npn \cs_gset_eq:cc { \exp_args:Ncc \cs_gset_eq:NN } \cs_new_protected:Npn \cs_gnew_eq:NN #1 { \chk_if_free_cs:N #1 \pref_global:D \cs_set_eq:NN #1 } -\cs_new_nopar:Npn \cs_gnew_eq:cN { \exp_args:Nc \cs_gnew_eq:NN } -\cs_new_nopar:Npn \cs_gnew_eq:Nc { \exp_args:NNc \cs_gnew_eq:NN } -\cs_new_nopar:Npn \cs_gnew_eq:cc { \exp_args:Ncc \cs_gnew_eq:NN } -\cs_new_nopar:Npn \cs_gundefine:N #1{\cs_gset_eq:NN #1\c_undefined:D} -\cs_new_nopar:Npn \cs_gundefine:c #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 } +\cs_new_protected_nopar:Npn \cs_gnew_eq:cc { \exp_args:Ncc \cs_gnew_eq:NN } +\cs_new_protected_nopar:Npn \cs_undefine:N #1 { + \cs_set_eq:NN #1 \c_undefined:D +} +\cs_new_protected_nopar:Npn \cs_undefine:c #1 { + \cs_set_eq:cN {#1} \c_undefined:D +} +\cs_new_protected_nopar:Npn \cs_gundefine:N #1 { + \cs_gset_eq:NN #1 \c_undefined:D +} +\cs_new_protected_nopar:Npn \cs_gundefine:c #1 { \cs_gset_eq:cN {#1} \c_undefined:D } \if_cs_exist:N \xetex_version:D |