diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3keys.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3keys.sty | 277 |
1 files changed, 150 insertions, 127 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty index e232f8e1645..ab3bf0dcd66 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3bootstrap} -\GetIdInfo$Id: l3keys.dtx 4461 2013-02-24 18:55:17Z joseph $ +\GetIdInfo$Id: l3keys.dtx 4544 2013-07-12 07:14:52Z joseph $ {L3 Experimental key-value interfaces} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -198,8 +198,11 @@ \cs_if_exist:cTF { \c__keys_props_root_tl \l__keys_property_tl } { \__keys_define_key:n {#2} } { - \__msg_kernel_error:nnxx { kernel } { property-unknown } - { \l__keys_property_tl } { \l_keys_path_tl } + \str_if_eq_x:nnF { \l__keys_property_tl } { .abort: } + { + \__msg_kernel_error:nnxx { kernel } { property-unknown } + { \l__keys_property_tl } { \l_keys_path_tl } + } } } \cs_new_protected:Npn \__keys_property_find:n #1 @@ -207,7 +210,10 @@ \tl_set:Nx \l_keys_path_tl { \l__keys_module_tl / } \tl_if_in:nnTF {#1} { . } { \__keys_property_find:w #1 \q_stop } - { \__msg_kernel_error:nnx { kernel } { key-no-property } {#1} } + { + \__msg_kernel_error:nnx { kernel } { key-no-property } {#1} + \tl_set:Nn \l__keys_property_tl { .abort: } + } } \cs_new_protected:Npn \__keys_property_find:w #1 . #2 \q_stop { @@ -236,7 +242,7 @@ } \cs_new_protected:Npn \__keys_define_key:w #1 : #2 \q_stop { \tl_if_empty:nTF {#2} } -\cs_new:Npn \__keys_bool_set:NN #1#2 +\cs_new_protected:Npn \__keys_bool_set:Nn #1#2 { \bool_if_exist:NF #1 { \bool_new:N #1 } \__keys_choice_make: @@ -251,7 +257,8 @@ } \__keys_default_set:n { true } } -\cs_new:Npn \__keys_bool_set_inverse:NN #1#2 +\cs_generate_variant:Nn \__keys_bool_set:Nn { c } +\cs_new_protected:Npn \__keys_bool_set_inverse:Nn #1#2 { \bool_if_exist:NF #1 { \bool_new:N #1 } \__keys_choice_make: @@ -266,6 +273,7 @@ } \__keys_default_set:n { true } } +\cs_generate_variant:Nn \__keys_bool_set_inverse:Nn { c } \cs_new_protected_nopar:Npn \__keys_choice_make: { \__keys_cmd_set:nn { \l_keys_path_tl } @@ -292,55 +300,12 @@ } } } -\cs_new_protected:Npn \__keys_choices_generate:n #1 - { - \cs_if_exist:cTF - { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } - { - \__keys_choice_make: - \int_zero:N \l_keys_choice_int - \clist_map_function:nN {#1} \__keys_choices_generate_aux:n - } - { - \__msg_kernel_error:nnx { kernel } - { generate-choices-before-code } { \l_keys_path_tl } - } - } -\cs_new_protected:Npn \__keys_choices_generate_aux:n #1 - { - \int_incr:N \l_keys_choice_int - \__keys_cmd_set:nx { \l_keys_path_tl / #1 } - { - \tl_set:Nn \exp_not:N \l_keys_choice_tl {#1} - \int_set:Nn \exp_not:N \l_keys_choice_int - { \int_use:N \l_keys_choice_int } - \exp_not:v - { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } - } - } -\cs_new_protected:Npn \__keys_choice_code_store:n #1 - { - \cs_if_exist:cF - { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } - { - \tl_new:c - { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } - } - \tl_set:cn { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } - {#1} - } -\cs_generate_variant:Nn \__keys_choice_code_store:n { x } \cs_new_protected:Npn \__keys_cmd_set:nn #1#2 { \__keys_cmd_set:n {#1} \cs_set:cpn { \c__keys_code_root_tl #1 } ##1 {#2} } -\cs_new_protected:Npn \__keys_cmd_set:nx #1#2 - { - \__keys_cmd_set:n {#1} - \cs_set:cpx { \c__keys_code_root_tl #1 } ##1 {#2} - } -\cs_generate_variant:Nn \__keys_cmd_set:nn { Vo } +\cs_generate_variant:Nn \__keys_cmd_set:nn { nx , Vn , Vo } \cs_new_protected:Npn \__keys_cmd_set:n #1 { \tl_clear_new:c { \c__keys_vars_root_tl #1 .default } @@ -349,25 +314,17 @@ } \cs_new_protected:Npn \__keys_default_set:n #1 { \tl_set:cn { \c__keys_vars_root_tl \l_keys_path_tl .default } {#1} } -\cs_generate_variant:Nn \__keys_default_set:n { V } \cs_new_protected:Npn \__keys_initialise:n #1 - { - \use:x - { \exp_after:wN \__keys_initialise:wn \l_keys_path_tl \q_stop {#1} } - } -\cs_generate_variant:Nn \__keys_initialise:n { V } -\cs_new:Npn \__keys_initialise:wn #1 / #2 \q_stop #3 - { \keys_set:nn {#1} { #2 = \exp_not:n { {#3} } } } + { \exp_after:wN \__keys_initialise:wn \l_keys_path_tl \q_stop {#1} } +\cs_new_protected:Npn \__keys_initialise:wn #1 / #2 \q_stop #3 + { \keys_set:nn {#1} { #2 = {#3} } } \cs_new_protected:Npn \__keys_meta_make:n #1 { \__keys_cmd_set:Vo \l_keys_path_tl { \exp_after:wN \keys_set:nn \exp_after:wN { \l__keys_module_tl } {#1} } } -\cs_new_protected:Npn \__keys_meta_make:x #1 - { - \__keys_cmd_set:nx { \l_keys_path_tl } - { \exp_not:N \keys_set:nn { \l__keys_module_tl } {#1} } - } +\cs_new_protected:Npn \__keys_meta_make:nn #1#2 + { \__keys_cmd_set:Vn \l_keys_path_tl { \keys_set:nn {#1} {#2} } } \cs_new:Npn \__keys_multichoice_find:n #1 { \clist_map_function:nN {#1} \__keys_choice_find:n } \cs_new_protected_nopar:Npn \__keys_multichoice_make: @@ -402,110 +359,127 @@ { \c__keys_vars_root_tl \l_keys_path_tl .req } { c__keys_value_ #1 _tl } } -\cs_new_protected:Npn \__keys_variable_set:NnNN #1#2#3#4 +\cs_new_protected:Npn \__keys_variable_set:NnnN #1#2#3#4 { \use:c { #2_if_exist:NF } #1 { \use:c { #2 _new:N } #1 } \__keys_cmd_set:nx { \l_keys_path_tl } - { \exp_not:c { #2 _ #3 set:N #4 } \exp_not:N #1 {##1} } + { \exp_not:c { #2 _ #3 set:N #4 } \exp_not:N #1 \exp_not:n { {##1} } } } -\cs_new_protected:Npn \__keys_variable_set:NnN #1#2#3 - { \__keys_variable_set:NnNN #1 {#2} { } #3 } -\cs_generate_variant:Nn \__keys_variable_set:NnNN { c } -\cs_generate_variant:Nn \__keys_variable_set:NnN { c } +\cs_generate_variant:Nn \__keys_variable_set:NnnN { c } \cs_new_protected:cpn { \c__keys_props_root_tl .bool_set:N } #1 - { \__keys_bool_set:NN #1 { } } + { \__keys_bool_set:Nn #1 { } } +\cs_new_protected:cpn { \c__keys_props_root_tl .bool_set:c } #1 + { \__keys_bool_set:cn {#1} { } } \cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset:N } #1 - { \__keys_bool_set:NN #1 g } + { \__keys_bool_set:Nn #1 { g } } +\cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset:c } #1 + { \__keys_bool_set:cn {#1} { g } } \cs_new_protected:cpn { \c__keys_props_root_tl .bool_set_inverse:N } #1 - { \__keys_bool_set_inverse:NN #1 { } } + { \__keys_bool_set_inverse:Nn #1 { } } +\cs_new_protected:cpn { \c__keys_props_root_tl .bool_set_inverse:c } #1 + { \__keys_bool_set_inverse:cn {#1} { } } \cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset_inverse:N } #1 - { \__keys_bool_set_inverse:NN #1 g } + { \__keys_bool_set_inverse:Nn #1 { g } } +\cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset_inverse:c } #1 + { \__keys_bool_set_inverse:cn {#1} { g } } \cs_new_protected_nopar:cpn { \c__keys_props_root_tl .choice: } { \__keys_choice_make: } \cs_new_protected:cpn { \c__keys_props_root_tl .choices:nn } #1 { \__keys_choices_make:nn #1 } +\cs_new_protected:cpn { \c__keys_props_root_tl .choices:Vn } #1 + { \exp_args:NV \__keys_choices_make:nn #1 } +\cs_new_protected:cpn { \c__keys_props_root_tl .choices:on } #1 + { \exp_args:No \__keys_choices_make:nn #1 } +\cs_new_protected:cpn { \c__keys_props_root_tl .choices:xn } #1 + { \exp_args:Nx \__keys_choices_make:nn #1 } \cs_new_protected:cpn { \c__keys_props_root_tl .code:n } #1 { \__keys_cmd_set:nn { \l_keys_path_tl } {#1} } -\cs_new_protected:cpn { \c__keys_props_root_tl .code:x } #1 - { \__keys_cmd_set:nx { \l_keys_path_tl } {#1} } -\cs_new_protected:cpn { \c__keys_props_root_tl .choice_code:n } #1 - { \__keys_choice_code_store:n {#1} } -\cs_new_protected:cpn { \c__keys_props_root_tl .choice_code:x } #1 - { \__keys_choice_code_store:x {#1} } \cs_new_protected:cpn { \c__keys_props_root_tl .clist_set:N } #1 - { \__keys_variable_set:NnN #1 { clist } n } + { \__keys_variable_set:NnnN #1 { clist } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .clist_set:c } #1 - { \__keys_variable_set:cnN {#1} { clist } n } + { \__keys_variable_set:cnnN {#1} { clist } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .clist_gset:N } #1 - { \__keys_variable_set:NnNN #1 { clist } g n } + { \__keys_variable_set:NnnN #1 { clist } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .clist_gset:c } #1 - { \__keys_variable_set:cnNN {#1} { clist } g n } + { \__keys_variable_set:cnnN {#1} { clist } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .default:n } #1 { \__keys_default_set:n {#1} } \cs_new_protected:cpn { \c__keys_props_root_tl .default:V } #1 - { \__keys_default_set:V #1 } + { \exp_args:NV \__keys_default_set:n #1 } +\cs_new_protected:cpn { \c__keys_props_root_tl .default:o } #1 + { \exp_args:No \__keys_default_set:n {#1} } +\cs_new_protected:cpn { \c__keys_props_root_tl .default:x } #1 + { \exp_args:Nx \__keys_default_set:n {#1} } \cs_new_protected:cpn { \c__keys_props_root_tl .dim_set:N } #1 - { \__keys_variable_set:NnN #1 { dim } n } + { \__keys_variable_set:NnnN #1 { dim } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .dim_set:c } #1 - { \__keys_variable_set:cnN {#1} { dim } n } + { \__keys_variable_set:cnnN {#1} { dim } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .dim_gset:N } #1 - { \__keys_variable_set:NnNN #1 { dim } g n } + { \__keys_variable_set:NnnN #1 { dim } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .dim_gset:c } #1 - { \__keys_variable_set:cnNN {#1} { dim } g n } + { \__keys_variable_set:cnnN {#1} { dim } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .fp_set:N } #1 - { \__keys_variable_set:NnN #1 { fp } n } + { \__keys_variable_set:NnnN #1 { fp } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .fp_set:c } #1 - { \__keys_variable_set:cnN {#1} { fp } n } + { \__keys_variable_set:cnnN {#1} { fp } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .fp_gset:N } #1 - { \__keys_variable_set:NnNN #1 { fp } g n } + { \__keys_variable_set:NnnN #1 { fp } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .fp_gset:c } #1 - { \__keys_variable_set:cnNN {#1} { fp } g n } -\cs_new_protected:cpn { \c__keys_props_root_tl .generate_choices:n } #1 - { \__keys_choices_generate:n {#1} } + { \__keys_variable_set:cnnN {#1} { fp } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .initial:n } #1 { \__keys_initialise:n {#1} } \cs_new_protected:cpn { \c__keys_props_root_tl .initial:V } #1 - { \__keys_initialise:V #1 } + { \exp_args:NV \__keys_initialise:n #1 } +\cs_new_protected:cpn { \c__keys_props_root_tl .initial:o } #1 + { \exp_args:No \__keys_initialise:n {#1} } +\cs_new_protected:cpn { \c__keys_props_root_tl .initial:x } #1 + { \exp_args:Nx \__keys_initialise:n {#1} } \cs_new_protected:cpn { \c__keys_props_root_tl .int_set:N } #1 - { \__keys_variable_set:NnN #1 { int } n } + { \__keys_variable_set:NnnN #1 { int } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .int_set:c } #1 - { \__keys_variable_set:cnN {#1} { int } n } + { \__keys_variable_set:cnnN {#1} { int } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .int_gset:N } #1 - { \__keys_variable_set:NnNN #1 { int } g n } + { \__keys_variable_set:NnnN #1 { int } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .int_gset:c } #1 - { \__keys_variable_set:cnNN {#1} { int } g n } + { \__keys_variable_set:cnnN {#1} { int } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .meta:n } #1 { \__keys_meta_make:n {#1} } -\cs_new_protected:cpn { \c__keys_props_root_tl .meta:x } #1 - { \__keys_meta_make:x {#1} } +\cs_new_protected:cpn { \c__keys_props_root_tl .meta:nn } #1 + { \__keys_meta_make:nn #1 } \cs_new_protected_nopar:cpn { \c__keys_props_root_tl .multichoice: } { \__keys_multichoice_make: } \cs_new_protected:cpn { \c__keys_props_root_tl .multichoices:nn } #1 { \__keys_multichoices_make:nn #1 } +\cs_new_protected:cpn { \c__keys_props_root_tl .multichoices:Vn } #1 + { \exp_args:NV \__keys_multichoices_make:nn #1 } +\cs_new_protected:cpn { \c__keys_props_root_tl .multichoices:on } #1 + { \exp_args:No \__keys_multichoices_make:nn #1 } +\cs_new_protected:cpn { \c__keys_props_root_tl .multichoices:xn } #1 + { \exp_args:Nx \__keys_multichoices_make:nn #1 } \cs_new_protected:cpn { \c__keys_props_root_tl .skip_set:N } #1 - { \__keys_variable_set:NnN #1 { skip } n } + { \__keys_variable_set:NnnN #1 { skip } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .skip_set:c } #1 - { \__keys_variable_set:cnN {#1} { skip } n } + { \__keys_variable_set:cnnN {#1} { skip } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .skip_gset:N } #1 - { \__keys_variable_set:NnNN #1 { skip } g n } + { \__keys_variable_set:NnnN #1 { skip } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .skip_gset:c } #1 - { \__keys_variable_set:cnNN {#1} { skip } g n } + { \__keys_variable_set:cnnN {#1} { skip } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .tl_set:N } #1 - { \__keys_variable_set:NnN #1 { tl } n } + { \__keys_variable_set:NnnN #1 { tl } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .tl_set:c } #1 - { \__keys_variable_set:cnN {#1} { tl } n } + { \__keys_variable_set:cnnN {#1} { tl } { } n } \cs_new_protected:cpn { \c__keys_props_root_tl .tl_set_x:N } #1 - { \__keys_variable_set:NnN #1 { tl } x } + { \__keys_variable_set:NnnN #1 { tl } { } x } \cs_new_protected:cpn { \c__keys_props_root_tl .tl_set_x:c } #1 - { \__keys_variable_set:cnN {#1} { tl } x } + { \__keys_variable_set:cnnN {#1} { tl } { } x } \cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset:N } #1 - { \__keys_variable_set:NnNN #1 { tl } g n } + { \__keys_variable_set:NnnN #1 { tl } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset:c } #1 - { \__keys_variable_set:cnNN {#1} { tl } g n } + { \__keys_variable_set:cnnN {#1} { tl } { g } n } \cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset_x:N } #1 - { \__keys_variable_set:NnNN #1 { tl } g x } + { \__keys_variable_set:NnnN #1 { tl } { g } x } \cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset_x:c } #1 - { \__keys_variable_set:cnNN {#1} { tl } g x } + { \__keys_variable_set:cnnN {#1} { tl } { g } x } \cs_new_protected_nopar:cpn { \c__keys_props_root_tl .value_forbidden: } { \__keys_value_requirement:n { forbidden } } \cs_new_protected_nopar:cpn { \c__keys_props_root_tl .value_required: } @@ -530,7 +504,7 @@ \keyval_parse:NNn \__keys_set_elt:n \__keys_set_elt:nn {#3} \cs_set_eq:NN \__keys_execute_unknown: \__keys_execute_unknown_std: \tl_set:Nn \l__keys_module_tl {#1} - \clist_set_eq:NN #4 \l__keys_unknown_clist + \cs_set_eq:NN #4 \l__keys_unknown_clist } \cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no } \cs_generate_variant:Nn \__keys_set_known:nnnN { o } @@ -593,9 +567,9 @@ { \prg_return_true: } { \prg_return_false: } } -\cs_new_nopar:Npn \__keys_execute: +\cs_new_protected_nopar:Npn \__keys_execute: { \__keys_execute:nn { \l_keys_path_tl } { \__keys_execute_unknown: } } -\cs_new_nopar:Npn \__keys_execute_unknown: +\cs_new_protected_nopar:Npn \__keys_execute_unknown: { \__keys_execute:nn { \l__keys_module_tl / unknown } { @@ -604,7 +578,7 @@ } } \cs_new_eq:NN \__keys_execute_unknown_std: \__keys_execute_unknown: -\cs_new_nopar:Npn \__keys_execute_unknown_alt: +\cs_new_protected_nopar:Npn \__keys_execute_unknown_alt: { \clist_put_right:Nx \l__keys_unknown_clist { @@ -639,7 +613,7 @@ { \prg_return_true: } { \prg_return_false: } } -\cs_new:Npn \keys_show:nn #1#2 +\cs_new_protected:Npn \keys_show:nn #1#2 { \cs_show:c { \c__keys_code_root_tl #1 / \tl_to_str:n {#2} } } \__msg_kernel_new:nnnn { kernel } { boolean-values-only } { Key~'#1'~accepts~boolean~values~only. } @@ -650,20 +624,18 @@ The~key~'#1'~takes~a~limited~number~of~values.\\ The~input~given,~'#2',~is~not~on~the~list~accepted. } -\__msg_kernel_new:nnnn { kernel } { generate-choices-before-code } - { No~code~available~to~generate~choices~for~key~'#1'. } +\__msg_kernel_new:nnnn { kernel } { key-choice-unknown } + { Key~'#1'~accepts~only~a~fixed~set~of~choices. } { - \c_msg_coding_error_text_tl - Before~using~.generate_choices:n~the~code~should~be~defined~ - with~'.choice_code:n'~or~'.choice_code:x'. + The~key~'#1'~only~accepts~predefined~values,~and~'#2'~is~not~one~of~these. } \__msg_kernel_new:nnnn { kernel } { key-no-property } { No~property~given~in~definition~of~key~'#1'. } { \c_msg_coding_error_text_tl - Inside~\keys_define:nn each~key~name - needs~a~property: \\ - ~ ~ #1 .<property> \\ + Inside~\keys_define:nn each~key~name~ + needs~a~property: \\ \\ + \iow_indent:n { #1 .<property> } \\ \\ LaTeX~did~not~find~a~'.'~to~indicate~the~start~of~a~property. } \__msg_kernel_new:nnnn { kernel } { key-unknown } @@ -676,7 +648,7 @@ { The~property~'#1'~requires~a~value. } { \c_msg_coding_error_text_tl - LaTeX~was~asked~to~set~property~'#2'~for~key~'#1'.\\ + LaTeX~was~asked~to~set~property~'#1'~for~key~'#2'.\\ No~value~was~given~for~the~property,~and~one~is~required. } \__msg_kernel_new:nnnn { kernel } { property-unknown } @@ -698,6 +670,57 @@ The~key~'#1'~must~have~a~value.\\ No~value~was~present:~the~key~will~be~ignored. } +\cs_new_protected:Npn \__keys_choice_code_store:n #1 + { + \cs_if_exist:cF + { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } + { + \tl_new:c + { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } + } + \tl_set:cn { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } + {#1} + } +\cs_generate_variant:Nn \__keys_choice_code_store:n { x } +\cs_new_protected:cpn { \c__keys_props_root_tl .choice_code:n } #1 + { \__keys_choice_code_store:n {#1} } +\cs_new_protected:cpn { \c__keys_props_root_tl .choice_code:x } #1 + { \__keys_choice_code_store:x {#1} } +\cs_new_protected:Npn \__keys_choices_generate:n #1 + { + \cs_if_exist:cTF + { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } + { + \__keys_choice_make: + \int_zero:N \l_keys_choice_int + \clist_map_function:nN {#1} \__keys_choices_generate_aux:n + } + { + \__msg_kernel_error:nnx { kernel } + { generate-choices-before-code } { \l_keys_path_tl } + } + } +\cs_new_protected:Npn \__keys_choices_generate_aux:n #1 + { + \int_incr:N \l_keys_choice_int + \__keys_cmd_set:nx { \l_keys_path_tl / #1 } + { + \tl_set:Nn \exp_not:N \l_keys_choice_tl {#1} + \int_set:Nn \exp_not:N \l_keys_choice_int + { \int_use:N \l_keys_choice_int } + \exp_not:v + { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } + } + } +\__msg_kernel_new:nnnn { kernel } { generate-choices-before-code } + { No~code~available~to~generate~choices~for~key~'#1'. } + { + \c_msg_coding_error_text_tl + Before~using~.generate_choices:n~the~code~should~be~defined~ + with~'.choice_code:n'~or~'.choice_code:x'. + } +\cs_new_protected:cpn { \c__keys_props_root_tl .generate_choices:n } #1 + { \__keys_choices_generate:n {#1} } %% %% %% End of file `l3keys.sty'. |