diff options
author | Karl Berry <karl@freefriends.org> | 2012-07-23 17:15:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-07-23 17:15:00 +0000 |
commit | 134349701bddf7cbbacf6030c6b9f9838aff96fa (patch) | |
tree | ec1140c46e1c0347a671a6fa3cf8af5a79e95f93 /Master/texmf-dist/tex/latex/l3kernel/l3keys.sty | |
parent | f7855c12c18bb97b7b9e49ab685ee558d8c0b47b (diff) |
l3kernel 3990 (17jul12)
git-svn-id: svn://tug.org/texlive/trunk@27108 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3keys.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3keys.sty | 687 |
1 files changed, 348 insertions, 339 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty index a0ae5751eb3..3d1a698da0b 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3keys.sty @@ -13,7 +13,7 @@ %% %% Do not distribute a modified version of this file. %% -%% File: l3keys.dtx Copyright (C) 2006-2011 The LaTeX3 Project +%% File: l3keys.dtx Copyright (C) 2006-2012 The 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 @@ -46,16 +46,16 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3keys.dtx 3487 2012-03-03 19:36:51Z bruno $ +\GetIdInfo$Id: l3keys.dtx 3986 2012-07-15 19:23:51Z joseph $ {L3 Experimental key-value interfaces} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\package_check_loaded_expl: -\int_new:N \g_keyval_level_int -\tl_new:N \l_keyval_key_tl -\tl_new:N \l_keyval_value_tl -\tl_new:N \l_keyval_sanitise_tl -\tl_new:N \l_keyval_parse_tl +\__expl_package_check: +\int_new:N \g__keyval_level_int +\tl_new:N \l__keyval_key_tl +\tl_new:N \l__keyval_value_tl +\tl_new:N \l__keyval_sanitise_tl +\tl_new:N \l__keyval_parse_tl \group_begin: \char_set_catcode_active:n { `\= } \char_set_catcode_active:n { `\, } @@ -64,585 +64,599 @@ \tl_to_lowercase:n { \group_end: - \cs_new_protected:Npn \keyval_parse:n #1 + \cs_new_protected:Npn \__keyval_parse:n #1 { \group_begin: - \tl_clear:N \l_keyval_sanitise_tl - \tl_set:Nn \l_keyval_sanitise_tl {#1} - \tl_replace_all:Nnn \l_keyval_sanitise_tl { = } { 8 } - \tl_replace_all:Nnn \l_keyval_sanitise_tl { , } { 9 } - \tl_clear:N \l_keyval_parse_tl - \exp_after:wN \keyval_parse_elt:w \exp_after:wN - \q_no_value \l_keyval_sanitise_tl 9 \q_nil 9 + \tl_clear:N \l__keyval_sanitise_tl + \tl_set:Nn \l__keyval_sanitise_tl {#1} + \tl_replace_all:Nnn \l__keyval_sanitise_tl { = } { 8 } + \tl_replace_all:Nnn \l__keyval_sanitise_tl { , } { 9 } + \tl_clear:N \l__keyval_parse_tl + \exp_after:wN \__keyval_parse_elt:w \exp_after:wN + \q_no_value \l__keyval_sanitise_tl 9 \q_nil 9 \exp_after:wN \group_end: - \l_keyval_parse_tl + \l__keyval_parse_tl } } -\cs_new_protected:Npn \keyval_parse_elt:w #1 , +\cs_new_protected:Npn \__keyval_parse_elt:w #1 , { \tl_if_blank:oTF { \use_none:n #1 } - { \keyval_parse_elt:w \q_no_value } + { \__keyval_parse_elt:w \q_no_value } { \quark_if_nil:oF { \use_ii:nn #1 } { - \keyval_split_key_value:w #1 = = \q_stop - \keyval_parse_elt:w \q_no_value + \__keyval_split_key_value:w #1 = = \q_stop + \__keyval_parse_elt:w \q_no_value } } } -\cs_new_protected:Npn \keyval_split_key_value:w #1 = #2 \q_stop +\cs_new_protected:Npn \__keyval_split_key_value:w #1 = #2 \q_stop { - \keyval_split_key:w #1 \q_stop + \__keyval_split_key:w #1 \q_stop \str_if_eq:nnTF {#2} { = } { - \tl_put_right:Nx \l_keyval_parse_tl + \tl_put_right:Nx \l__keyval_parse_tl { \exp_not:c - { keyval_key_no_value_elt_ \int_use:N \g_keyval_level_int :n } - { \exp_not:o \l_keyval_key_tl } + { __keyval_key_no_value_elt_ \int_use:N \g__keyval_level_int :n } + { \exp_not:o \l__keyval_key_tl } } } { - \keyval_split_key_value_aux:wTF #2 \q_no_value \q_stop - { \keyval_split_value:w \q_nil #2 } - { \msg_kernel_error:nn { keyval } { misplaced-equals-sign } } + \__keyval_split_key_value:wTF #2 \q_no_value \q_stop + { \__keyval_split_value:w \q_nil #2 } + { \__msg_kernel_error:nn { kernel } { misplaced-equals-sign } } } } -\cs_new:Npn \keyval_split_key_value_aux:wTF #1 = #2#3 \q_stop +\cs_new:Npn \__keyval_split_key_value:wTF #1 = #2#3 \q_stop { \tl_if_head_eq_meaning:nNTF {#3} \q_no_value } -\cs_new_protected:Npn \keyval_split_key:w #1 \q_stop +\cs_new_protected:Npn \__keyval_split_key:w #1 \q_stop { - \tl_set:Nx \l_keyval_key_tl + \tl_set:Nx \l__keyval_key_tl { \exp_after:wN \tl_trim_spaces:n \exp_after:wN { \use_none:n #1 } } } -\cs_new_protected:Npn \keyval_split_value:w #1 = = +\cs_new_protected:Npn \__keyval_split_value:w #1 = = { - \tl_put_right:Nx \l_keyval_parse_tl + \tl_put_right:Nx \l__keyval_parse_tl { \exp_not:c - { keyval_key_value_elt_ \int_use:N \g_keyval_level_int :nn } - { \exp_not:o \l_keyval_key_tl } + { __keyval_key_value_elt_ \int_use:N \g__keyval_level_int :nn } + { \exp_not:o \l__keyval_key_tl } } - \tl_set:Nx \l_keyval_value_tl + \tl_set:Nx \l__keyval_value_tl { \exp_not:o { \use_none:nnn #1 \q_nil \q_nil } } - \tl_if_empty:NTF \l_keyval_value_tl - { \tl_put_right:Nn \l_keyval_parse_tl { { } } } + \tl_if_empty:NTF \l__keyval_value_tl + { \tl_put_right:Nn \l__keyval_parse_tl { { } } } { - \quark_if_nil:NTF \l_keyval_value_tl + \quark_if_nil:NTF \l__keyval_value_tl { - \tl_put_right:Nx \l_keyval_parse_tl + \tl_put_right:Nx \l__keyval_parse_tl { { \exp_not:o { \use_ii:nnn #1 \q_nil } } } } - { \keyval_split_value_aux:w #1 \q_stop } + { \__keyval_split_value_aux:w #1 \q_stop } } } -\cs_new_protected:Npn \keyval_split_value_aux:w \q_nil #1 \q_stop +\cs_new_protected:Npn \__keyval_split_value_aux:w \q_nil #1 \q_stop { - \tl_set:Nx \l_keyval_value_tl { \tl_trim_spaces:n {#1} } - \tl_put_right:Nx \l_keyval_parse_tl - { { \exp_not:o \l_keyval_value_tl } } + \tl_set:Nx \l__keyval_value_tl { \tl_trim_spaces:n {#1} } + \tl_put_right:Nx \l__keyval_parse_tl + { { \exp_not:o \l__keyval_value_tl } } } \cs_new_protected:Npn \keyval_parse:NNn #1#2#3 { - \int_gincr:N \g_keyval_level_int + \int_gincr:N \g__keyval_level_int \cs_gset_eq:cN - { keyval_key_no_value_elt_ \int_use:N \g_keyval_level_int :n } #1 + { __keyval_key_no_value_elt_ \int_use:N \g__keyval_level_int :n } #1 \cs_gset_eq:cN - { keyval_key_value_elt_ \int_use:N \g_keyval_level_int :nn } #2 - \keyval_parse:n {#3} - \int_gdecr:N \g_keyval_level_int + { __keyval_key_value_elt_ \int_use:N \g__keyval_level_int :nn } #2 + \__keyval_parse:n {#3} + \int_gdecr:N \g__keyval_level_int } -\msg_kernel_new:nnnn { keyval } { misplaced-equals-sign } +\__msg_kernel_new:nnnn { kernel } { misplaced-equals-sign } { Misplaced~equals~sign~in~key-value~input~\msg_line_number: } { LaTeX~is~attempting~to~parse~some~key-value~input~but~found~ two~equals~signs~not~separated~by~a~comma. } -\tl_const:Nn \c_keys_code_root_tl { key~code~>~ } -\tl_const:Nn \c_keys_vars_root_tl { key~var~>~ } -\tl_const:Nn \c_keys_props_root_tl { key~prop~>~ } -\tl_const:Nn \c_keys_value_forbidden_tl { forbidden } -\tl_const:Nn \c_keys_value_required_tl { required } +\tl_const:Nn \c__keys_code_root_tl { key~code~>~ } +\tl_const:Nn \c__keys_vars_root_tl { key~var~>~ } +\tl_const:Nn \c__keys_props_root_tl { key~prop~>~ } +\tl_const:Nn \c__keys_value_forbidden_tl { forbidden } +\tl_const:Nn \c__keys_value_required_tl { required } \int_new:N \l_keys_choice_int -\tl_new:N \l_keys_choices_tl +\tl_new:N \l_keys_choice_tl \tl_new:N \l_keys_key_tl -\tl_new:N \l_keys_module_tl -\bool_new:N \l_keys_no_value_bool +\tl_new:N \l__keys_module_tl +\bool_new:N \l__keys_no_value_bool \tl_new:N \l_keys_path_tl -\tl_new:N \l_keys_property_tl -\tl_new:N \l_keys_unknown_clist +\tl_new:N \l__keys_property_tl +\tl_new:N \l__keys_unknown_clist \tl_new:N \l_keys_value_tl \cs_new_protected:Npn \keys_define:nn - { \keys_define_aux:onn \l_keys_module_tl } -\cs_new_protected:Npn \keys_define_aux:nnn #1#2#3 + { \__keys_define:onn \l__keys_module_tl } +\cs_new_protected:Npn \__keys_define:nnn #1#2#3 { - \tl_set:Nx \l_keys_module_tl { \tl_to_str:n {#2} } - \keyval_parse:NNn \keys_define_elt:n \keys_define_elt:nn {#3} - \tl_set:Nn \l_keys_module_tl {#1} + \tl_set:Nx \l__keys_module_tl { \tl_to_str:n {#2} } + \keyval_parse:NNn \__keys_define_elt:n \__keys_define_elt:nn {#3} + \tl_set:Nn \l__keys_module_tl {#1} } -\cs_generate_variant:Nn \keys_define_aux:nnn { o } -\cs_new_protected:Npn \keys_define_elt:n #1 +\cs_generate_variant:Nn \__keys_define:nnn { o } +\cs_new_protected:Npn \__keys_define_elt:n #1 { - \bool_set_true:N \l_keys_no_value_bool - \keys_define_elt_aux:nn {#1} { } + \bool_set_true:N \l__keys_no_value_bool + \__keys_define_elt_aux:nn {#1} { } } -\cs_new_protected:Npn \keys_define_elt:nn #1#2 +\cs_new_protected:Npn \__keys_define_elt:nn #1#2 { - \bool_set_false:N \l_keys_no_value_bool - \keys_define_elt_aux:nn {#1} {#2} + \bool_set_false:N \l__keys_no_value_bool + \__keys_define_elt_aux:nn {#1} {#2} } -\cs_new_protected:Npn \keys_define_elt_aux:nn #1#2 +\cs_new_protected:Npn \__keys_define_elt_aux:nn #1#2 { - \keys_property_find:n {#1} - \cs_if_exist:cTF { \c_keys_props_root_tl \l_keys_property_tl } - { \keys_define_key:n {#2} } + \__keys_property_find:n {#1} + \cs_if_exist:cTF { \c__keys_props_root_tl \l__keys_property_tl } + { \__keys_define_key:n {#2} } { - \msg_kernel_error:nnxx { keys } { property-unknown } - { \l_keys_property_tl } { \l_keys_path_tl } + \__msg_kernel_error:nnxx { kernel } { property-unknown } + { \l__keys_property_tl } { \l_keys_path_tl } } } -\cs_new_protected:Npn \keys_property_find:n #1 +\cs_new_protected:Npn \__keys_property_find:n #1 { - \tl_set:Nx \l_keys_path_tl { \l_keys_module_tl / } + \tl_set:Nx \l_keys_path_tl { \l__keys_module_tl / } \tl_if_in:nnTF {#1} { . } - { \keys_property_find_aux:w #1 \q_stop } - { \msg_kernel_error:nnx { keys } { key-no-property } {#1} } + { \__keys_property_find:w #1 \q_stop } + { \__msg_kernel_error:nnx { kernel } { key-no-property } {#1} } } -\cs_new_protected:Npn \keys_property_find_aux:w #1 . #2 \q_stop +\cs_new_protected:Npn \__keys_property_find:w #1 . #2 \q_stop { \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl \tl_to_str:n {#1} } \tl_if_in:nnTF {#2} { . } { \tl_set:Nx \l_keys_path_tl { \l_keys_path_tl . } - \keys_property_find_aux:w #2 \q_stop + \__keys_property_find:w #2 \q_stop } - { \tl_set:Nn \l_keys_property_tl { . #2 } } + { \tl_set:Nn \l__keys_property_tl { . #2 } } } -\cs_new_protected:Npn \keys_define_key:n #1 +\cs_new_protected:Npn \__keys_define_key:n #1 { - \bool_if:NTF \l_keys_no_value_bool + \bool_if:NTF \l__keys_no_value_bool { - \exp_after:wN \keys_define_key_aux:w - \l_keys_property_tl \q_stop - { \use:c { \c_keys_props_root_tl \l_keys_property_tl } } + \exp_after:wN \__keys_define_key:w + \l__keys_property_tl \q_stop + { \use:c { \c__keys_props_root_tl \l__keys_property_tl } } { - \msg_kernel_error:nnxx { keys } - { property-requires-value } { \l_keys_property_tl } + \__msg_kernel_error:nnxx { kernel } + { property-requires-value } { \l__keys_property_tl } { \l_keys_path_tl } } } - { \use:c { \c_keys_props_root_tl \l_keys_property_tl } {#1} } + { \use:c { \c__keys_props_root_tl \l__keys_property_tl } {#1} } } -\cs_new_protected:Npn \keys_define_key_aux:w #1 : #2 \q_stop +\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:Npn \__keys_bool_set:NN #1#2 { \bool_if_exist:NF #1 { \bool_new:N #1 } - \keys_choice_make: - \keys_cmd_set:nx { \l_keys_path_tl / true } + \__keys_choice_make: + \__keys_cmd_set:nx { \l_keys_path_tl / true } { \exp_not:c { bool_ #2 set_true:N } \exp_not:N #1 } - \keys_cmd_set:nx { \l_keys_path_tl / false } + \__keys_cmd_set:nx { \l_keys_path_tl / false } { \exp_not:c { bool_ #2 set_false:N } \exp_not:N #1 } - \keys_cmd_set:nn { \l_keys_path_tl / unknown } + \__keys_cmd_set:nn { \l_keys_path_tl / unknown } { - \msg_kernel_error:nnx { keys } { boolean-values-only } + \__msg_kernel_error:nnx { kernel } { boolean-values-only } { \l_keys_key_tl } } - \keys_default_set:n { true } + \__keys_default_set:n { true } } -\cs_new:Npn \keys_bool_set_inverse:NN #1#2 +\cs_new:Npn \__keys_bool_set_inverse:NN #1#2 { \bool_if_exist:NF #1 { \bool_new:N #1 } - \keys_choice_make: - \keys_cmd_set:nx { \l_keys_path_tl / true } + \__keys_choice_make: + \__keys_cmd_set:nx { \l_keys_path_tl / true } { \exp_not:c { bool_ #2 set_false:N } \exp_not:N #1 } - \keys_cmd_set:nx { \l_keys_path_tl / false } + \__keys_cmd_set:nx { \l_keys_path_tl / false } { \exp_not:c { bool_ #2 set_true:N } \exp_not:N #1 } - \keys_cmd_set:nn { \l_keys_path_tl / unknown } + \__keys_cmd_set:nn { \l_keys_path_tl / unknown } { - \msg_kernel_error:nnx { keys } { boolean-values-only } + \__msg_kernel_error:nnx { kernel } { boolean-values-only } { \l_keys_key_tl } } - \keys_default_set:n { true } + \__keys_default_set:n { true } } -\cs_new_protected_nopar:Npn \keys_choice_make: +\cs_new_protected_nopar:Npn \__keys_choice_make: { - \keys_cmd_set:nn { \l_keys_path_tl } - { \keys_choice_find:n {##1} } - \keys_cmd_set:nn { \l_keys_path_tl / unknown } + \__keys_cmd_set:nn { \l_keys_path_tl } + { \__keys_choice_find:n {##1} } + \__keys_cmd_set:nn { \l_keys_path_tl / unknown } { - \msg_kernel_error:nnxx { keys } { choice-unknown } + \__msg_kernel_error:nnxx { kernel } { key-choice-unknown } { \l_keys_path_tl } {##1} } } -\cs_new_protected:Npn \keys_choices_make:nn #1#2 +\cs_new_protected:Npn \__keys_choices_make:nn #1#2 { - \keys_choice_make: + \__keys_choice_make: \int_zero:N \l_keys_choice_int \clist_map_inline:nn {#1} { - \keys_cmd_set:nx { \l_keys_path_tl / ##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:n {#2} } - \int_incr:N \l_keys_choice_int } } -\cs_new_protected:Npn \keys_choices_generate:n #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 } + { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } { - \keys_choice_make: + \__keys_choice_make: \int_zero:N \l_keys_choice_int - \clist_map_function:nN {#1} \keys_choices_generate_aux:n + \clist_map_function:nN {#1} \__keys_choices_generate_aux:n } { - \msg_kernel_error:nnx { keys } + \__msg_kernel_error:nnx { kernel } { generate-choices-before-code } { \l_keys_path_tl } } } -\cs_new_protected:Npn \keys_choices_generate_aux:n #1 +\cs_new_protected:Npn \__keys_choices_generate_aux:n #1 { - \keys_cmd_set:nx { \l_keys_path_tl / #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 } + { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } } - \int_incr:N \l_keys_choice_int } -\cs_new_protected:Npn \keys_choice_code_store:x #1 +\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 } + { \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 } + { \c__keys_vars_root_tl \l_keys_path_tl .choice~code } } - \tl_set:cx { \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_new_protected:Npn \keys_cmd_set:nn #1#2 +\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_aux:n {#1} - \cs_set:cpn { \c_keys_code_root_tl #1 } ##1 {#2} + \__keys_cmd_set:n {#1} + \cs_set:cpx { \c__keys_code_root_tl #1 } ##1 {#2} } -\cs_new_protected:Npn \keys_cmd_set:nx #1#2 +\cs_generate_variant:Nn \__keys_cmd_set:nn { Vo } +\cs_new_protected:Npn \__keys_cmd_set:n #1 { - \keys_cmd_set_aux:n {#1} - \cs_set:cpx { \c_keys_code_root_tl #1 } ##1 {#2} + \tl_clear_new:c { \c__keys_vars_root_tl #1 .default } + \tl_set:cn { \c__keys_vars_root_tl #1 .default } { \q_no_value } + \tl_clear_new:c { \c__keys_vars_root_tl #1 .req } } -\cs_new_protected:Npn \keys_cmd_set_aux:n #1 +\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 { - \tl_clear_new:c { \c_keys_vars_root_tl #1 .default } - \tl_set:cn { \c_keys_vars_root_tl #1 .default } { \q_no_value } - \tl_clear_new:c { \c_keys_vars_root_tl #1 .req } + \use:x + { \exp_after:wN \__keys_initialise:wn \l_keys_path_tl \q_stop {#1} } } -\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_meta_make:n #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} } } } +\cs_new_protected:Npn \__keys_meta_make:n #1 { - \exp_args:NNo \keys_cmd_set:nn \l_keys_path_tl - { \exp_after:wN \keys_set:nn \exp_after:wN { \l_keys_module_tl } {#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 +\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} } + \__keys_cmd_set:nx { \l_keys_path_tl } + { \exp_not:N \keys_set:nn { \l__keys_module_tl } {#1} } } -\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: +\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: { - \keys_cmd_set:nn { \l_keys_path_tl } - { \keys_multichoice_find:n {##1} } - \keys_cmd_set:nn { \l_keys_path_tl / unknown } + \__keys_cmd_set:nn { \l_keys_path_tl } + { \__keys_multichoice_find:n {##1} } + \__keys_cmd_set:nn { \l_keys_path_tl / unknown } { - \msg_kernel_error:nnxx { keys } { choice-unknown } + \__msg_kernel_error:nnxx { kernel } { key-choice-unknown } { \l_keys_path_tl } {##1} } } -\cs_new_protected:Npn \keys_multichoices_make:nn #1#2 +\cs_new_protected:Npn \__keys_multichoices_make:nn #1#2 { - \keys_multichoice_make: + \__keys_multichoice_make: \int_zero:N \l_keys_choice_int \clist_map_inline:nn {#1} { - \keys_cmd_set:nx { \l_keys_path_tl / ##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:n {#2} } - \int_incr:N \l_keys_choice_int } } -\cs_new_protected:Npn \keys_value_requirement:n #1 +\cs_new_protected:Npn \__keys_value_requirement:n #1 { \tl_set_eq:cc - { \c_keys_vars_root_tl \l_keys_path_tl .req } - { c_keys_value_ #1 _tl } + { \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 } + \__keys_cmd_set:nx { \l_keys_path_tl } { \exp_not:c { #2 _ #3 set:N #4 } \exp_not:N #1 {##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_new_protected:cpn { \c_keys_props_root_tl .bool_set:N } #1 - { \keys_bool_set:NN #1 { } } -\cs_new_protected:cpn { \c_keys_props_root_tl .bool_gset:N } #1 - { \keys_bool_set:NN #1 g } -\cs_new_protected:cpn { \c_keys_props_root_tl .bool_set_inverse:N } #1 - { \keys_bool_set_inverse:NN #1 { } } -\cs_new_protected:cpn { \c_keys_props_root_tl .bool_gset_inverse:N } #1 - { \keys_bool_set_inverse:NN #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 .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:x { \exp_not: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 } -\cs_new_protected:cpn { \c_keys_props_root_tl .clist_set:c } #1 - { \keys_variable_set:cnN {#1} { clist } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .clist_gset:N } #1 - { \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 } -\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 } -\cs_new_protected:cpn { \c_keys_props_root_tl .dim_set:N } #1 - { \keys_variable_set:NnN #1 { dim } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .dim_set:c } #1 - { \keys_variable_set:cnN {#1} { dim } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .dim_gset:N } #1 - { \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 } -\cs_new_protected:cpn { \c_keys_props_root_tl .fp_set:N } #1 - { \keys_variable_set:NnN #1 { fp } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .fp_set:c } #1 - { \keys_variable_set:cnN {#1} { fp } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .fp_gset:N } #1 - { \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} } -\cs_new_protected:cpn { \c_keys_props_root_tl .int_set:N } #1 - { \keys_variable_set:NnN #1 { int } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .int_set:c } #1 - { \keys_variable_set:cnN {#1} { int } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .int_gset:N } #1 - { \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 } -\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_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 .skip_set:N } #1 - { \keys_variable_set:NnN #1 { skip } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .skip_set:c } #1 - { \keys_variable_set:cnN {#1} { skip } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .skip_gset:N } #1 - { \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 } -\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set:N } #1 - { \keys_variable_set:NnN #1 { tl } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set:c } #1 - { \keys_variable_set:cnN {#1} { tl } n } -\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set_x:N } #1 - { \keys_variable_set:NnN #1 { tl } x } -\cs_new_protected:cpn { \c_keys_props_root_tl .tl_set_x:c } #1 - { \keys_variable_set:cnN {#1} { tl } x } -\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset:N } #1 - { \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 } -\cs_new_protected:cpn { \c_keys_props_root_tl .tl_gset_x:N } #1 - { \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 } -\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: } - { \keys_value_requirement:n { required } } +\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_new_protected:cpn { \c__keys_props_root_tl .bool_set:N } #1 + { \__keys_bool_set:NN #1 { } } +\cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset:N } #1 + { \__keys_bool_set:NN #1 g } +\cs_new_protected:cpn { \c__keys_props_root_tl .bool_set_inverse:N } #1 + { \__keys_bool_set_inverse:NN #1 { } } +\cs_new_protected:cpn { \c__keys_props_root_tl .bool_gset_inverse:N } #1 + { \__keys_bool_set_inverse:NN #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 .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 } +\cs_new_protected:cpn { \c__keys_props_root_tl .clist_set:c } #1 + { \__keys_variable_set:cnN {#1} { clist } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .clist_gset:N } #1 + { \__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 } +\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 } +\cs_new_protected:cpn { \c__keys_props_root_tl .dim_set:N } #1 + { \__keys_variable_set:NnN #1 { dim } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .dim_set:c } #1 + { \__keys_variable_set:cnN {#1} { dim } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .dim_gset:N } #1 + { \__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 } +\cs_new_protected:cpn { \c__keys_props_root_tl .fp_set:N } #1 + { \__keys_variable_set:NnN #1 { fp } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .fp_set:c } #1 + { \__keys_variable_set:cnN {#1} { fp } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .fp_gset:N } #1 + { \__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} } +\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 } +\cs_new_protected:cpn { \c__keys_props_root_tl .int_set:N } #1 + { \__keys_variable_set:NnN #1 { int } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .int_set:c } #1 + { \__keys_variable_set:cnN {#1} { int } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .int_gset:N } #1 + { \__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 } +\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_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 .skip_set:N } #1 + { \__keys_variable_set:NnN #1 { skip } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .skip_set:c } #1 + { \__keys_variable_set:cnN {#1} { skip } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .skip_gset:N } #1 + { \__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 } +\cs_new_protected:cpn { \c__keys_props_root_tl .tl_set:N } #1 + { \__keys_variable_set:NnN #1 { tl } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .tl_set:c } #1 + { \__keys_variable_set:cnN {#1} { tl } n } +\cs_new_protected:cpn { \c__keys_props_root_tl .tl_set_x:N } #1 + { \__keys_variable_set:NnN #1 { tl } x } +\cs_new_protected:cpn { \c__keys_props_root_tl .tl_set_x:c } #1 + { \__keys_variable_set:cnN {#1} { tl } x } +\cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset:N } #1 + { \__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 } +\cs_new_protected:cpn { \c__keys_props_root_tl .tl_gset_x:N } #1 + { \__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 } +\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: } + { \__keys_value_requirement:n { required } } \cs_new_protected:Npn \keys_set:nn - { \keys_set_aux:onn { \l_keys_module_tl } } -\cs_new_protected:Npn \keys_set_aux:nnn #1#2#3 + { \__keys_set:onn { \l__keys_module_tl } } +\cs_new_protected:Npn \__keys_set:nnn #1#2#3 { - \tl_set:Nx \l_keys_module_tl { \tl_to_str:n {#2} } - \keyval_parse:NNn \keys_set_elt:n \keys_set_elt:nn {#3} - \tl_set:Nn \l_keys_module_tl {#1} + \tl_set:Nx \l__keys_module_tl { \tl_to_str:n {#2} } + \keyval_parse:NNn \__keys_set_elt:n \__keys_set_elt:nn {#3} + \tl_set:Nn \l__keys_module_tl {#1} } \cs_generate_variant:Nn \keys_set:nn { nV , nv , no } -\cs_generate_variant:Nn \keys_set_aux:nnn { o } +\cs_generate_variant:Nn \__keys_set:nnn { o } \cs_new_protected:Npn \keys_set_known:nnN - { \keys_set_known_aux:onnN { \l_keys_module_tl } } -\cs_new_protected:Npn \keys_set_known_aux:nnnN #1#2#3#4 + { \__keys_set_known:onnN { \l__keys_module_tl } } +\cs_new_protected:Npn \__keys_set_known:nnnN #1#2#3#4 { - \tl_set:Nx \l_keys_module_tl { \tl_to_str:n {#2} } - \clist_clear:N \l_keys_unknown_clist - \cs_set_eq:NN \keys_execute_unknown: \keys_execute_unknown_alt: - \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 + \tl_set:Nx \l__keys_module_tl { \tl_to_str:n {#2} } + \clist_clear:N \l__keys_unknown_clist + \cs_set_eq:NN \__keys_execute_unknown: \__keys_execute_unknown_alt: + \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_generate_variant:Nn \keys_set_known:nnN { nV , nv , no } -\cs_generate_variant:Nn \keys_set_known_aux:nnnN { o } -\cs_new_protected:Npn \keys_set_elt:n #1 +\cs_generate_variant:Nn \__keys_set_known:nnnN { o } +\cs_new_protected:Npn \__keys_set_elt:n #1 { - \bool_set_true:N \l_keys_no_value_bool - \keys_set_elt_aux:nn {#1} { } + \bool_set_true:N \l__keys_no_value_bool + \__keys_set_elt_aux:nn {#1} { } } -\cs_new_protected:Npn \keys_set_elt:nn #1#2 +\cs_new_protected:Npn \__keys_set_elt:nn #1#2 { - \bool_set_false:N \l_keys_no_value_bool - \keys_set_elt_aux:nn {#1} {#2} + \bool_set_false:N \l__keys_no_value_bool + \__keys_set_elt_aux:nn {#1} {#2} } -\cs_new_protected:Npn \keys_set_elt_aux:nn #1#2 +\cs_new_protected:Npn \__keys_set_elt_aux:nn #1#2 { \tl_set:Nx \l_keys_key_tl { \tl_to_str:n {#1} } - \tl_set:Nx \l_keys_path_tl { \l_keys_module_tl / \l_keys_key_tl } - \keys_value_or_default:n {#2} + \tl_set:Nx \l_keys_path_tl { \l__keys_module_tl / \l_keys_key_tl } + \__keys_value_or_default:n {#2} \bool_if:nTF { - \keys_if_value_p:n { required } && - \l_keys_no_value_bool + \__keys_if_value_p:n { required } && + \l__keys_no_value_bool } { - \msg_kernel_error:nnx { keys } { value-required } + \__msg_kernel_error:nnx { kernel } { value-required } { \l_keys_path_tl } } { \bool_if:nTF { - \keys_if_value_p:n { forbidden } && - ! \l_keys_no_value_bool + \__keys_if_value_p:n { forbidden } && + ! \l__keys_no_value_bool } { - \msg_kernel_error:nnxx { keys } { value-forbidden } + \__msg_kernel_error:nnxx { kernel } { value-forbidden } { \l_keys_path_tl } { \l_keys_value_tl } } - { \keys_execute: } + { \__keys_execute: } } } -\cs_new_protected:Npn \keys_value_or_default:n #1 +\cs_new_protected:Npn \__keys_value_or_default:n #1 { \tl_set:Nn \l_keys_value_tl {#1} - \bool_if:NT \l_keys_no_value_bool + \bool_if:NT \l__keys_no_value_bool { - \quark_if_no_value:cF { \c_keys_vars_root_tl \l_keys_path_tl .default } + \quark_if_no_value:cF { \c__keys_vars_root_tl \l_keys_path_tl .default } { - \cs_if_exist:cT { \c_keys_vars_root_tl \l_keys_path_tl .default } + \cs_if_exist:cT { \c__keys_vars_root_tl \l_keys_path_tl .default } { \tl_set_eq:Nc \l_keys_value_tl - { \c_keys_vars_root_tl \l_keys_path_tl .default } + { \c__keys_vars_root_tl \l_keys_path_tl .default } } } } } -\prg_new_conditional:Npnn \keys_if_value:n #1 { p } +\prg_new_conditional:Npnn \__keys_if_value:n #1 { p } { - \tl_if_eq:ccTF { c_keys_value_ #1 _tl } - { \c_keys_vars_root_tl \l_keys_path_tl .req } + \tl_if_eq:ccTF { c__keys_value_ #1 _tl } + { \c__keys_vars_root_tl \l_keys_path_tl .req } { \prg_return_true: } { \prg_return_false: } } -\cs_new_nopar:Npn \keys_execute: - { \keys_execute:nn { \l_keys_path_tl } { \keys_execute_unknown: } } -\cs_new_nopar:Npn \keys_execute_unknown: +\cs_new_nopar:Npn \__keys_execute: + { \__keys_execute:nn { \l_keys_path_tl } { \__keys_execute_unknown: } } +\cs_new_nopar:Npn \__keys_execute_unknown: { - \keys_execute:nn { \l_keys_module_tl / unknown } + \__keys_execute:nn { \l__keys_module_tl / unknown } { - \msg_kernel_error:nnxx { keys } { key-unknown } - { \l_keys_path_tl } { \l_keys_module_tl } + \__msg_kernel_error:nnxx { kernel } { key-unknown } + { \l_keys_path_tl } { \l__keys_module_tl } } } -\cs_new_eq:NN \keys_execute_unknown_std: \keys_execute_unknown: -\cs_new_nopar:Npn \keys_execute_unknown_alt: +\cs_new_eq:NN \__keys_execute_unknown_std: \__keys_execute_unknown: +\cs_new_nopar:Npn \__keys_execute_unknown_alt: { - \clist_put_right:Nx \l_keys_unknown_clist + \clist_put_right:Nx \l__keys_unknown_clist { \exp_not:o \l_keys_key_tl - \bool_if:NF \l_keys_no_value_bool + \bool_if:NF \l__keys_no_value_bool { = { \exp_not:o \l_keys_value_tl } } } } -\cs_new:Npn \keys_execute:nn #1#2 +\cs_new:Npn \__keys_execute:nn #1#2 { - \cs_if_exist:cTF { \c_keys_code_root_tl #1 } + \cs_if_exist:cTF { \c__keys_code_root_tl #1 } { - \exp_args:Nc \exp_args:No { \c_keys_code_root_tl #1 } + \exp_args:Nc \exp_args:No { \c__keys_code_root_tl #1 } \l_keys_value_tl } {#2} } -\cs_new:Npn \keys_choice_find:n #1 +\cs_new:Npn \__keys_choice_find:n #1 { - \keys_execute:nn { \l_keys_path_tl / \tl_to_str:n {#1} } - { \keys_execute:nn { \l_keys_path_tl / unknown } { } } + \__keys_execute:nn { \l_keys_path_tl / \tl_to_str:n {#1} } + { \__keys_execute:nn { \l_keys_path_tl / unknown } { } } } \prg_new_conditional:Npnn \keys_if_exist:nn #1#2 { p , T , F , TF } { - \cs_if_exist:cTF { \c_keys_code_root_tl #1 / #2 } + \cs_if_exist:cTF { \c__keys_code_root_tl #1 / #2 } { \prg_return_true: } { \prg_return_false: } } \prg_new_conditional:Npnn \keys_if_choice_exist:nnn #1#2#3 { p , T , F , TF } { - \cs_if_exist:cTF { \c_keys_code_root_tl #1 / #2 / #3 } + \cs_if_exist:cTF { \c__keys_code_root_tl #1 / #2 / #3 } { \prg_return_true: } { \prg_return_false: } } \cs_new:Npn \keys_show:nn #1#2 - { \cs_show:c { \c_keys_code_root_tl #1 / \tl_to_str:n {#2} } } -\msg_kernel_new:nnnn { keys } { boolean-values-only } + { \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. } { The~key~'#1'~only~accepts~the~values~'true'~and~'false'. } -\msg_kernel_new:nnnn { keys } { choice-unknown } +\__msg_kernel_new:nnnn { kernel } { choice-unknown } { Choice~'#2'~unknown~for~key~'#1'. } { The~key~'#1'~takes~a~limited~number~of~values.\\ The~input~given,~'#2',~is~not~on~the~list~accepted. } -\msg_kernel_new:nnnn { keys } { generate-choices-before-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'. } -\msg_kernel_new:nnnn { keys } { key-no-property } +\__msg_kernel_new:nnnn { kernel } { key-no-property } { No~property~given~in~definition~of~key~'#1'. } { \c_msg_coding_error_text_tl @@ -651,44 +665,39 @@ ~ ~ #1 .<property> \\ LaTeX~did~not~find~a~'.'~to~indicate~the~start~of~a~property. } -\msg_kernel_new:nnnn { keys } { key-unknown } +\__msg_kernel_new:nnnn { kernel } { key-unknown } { The~key~'#1'~is~unknown~and~is~being~ignored. } { The~module~'#2'~does~not~have~a~key~called~#1'.\\ Check~that~you~have~spelled~the~key~name~correctly. } -\msg_kernel_new:nnnn { keys } { option-unknown } - { Unknown~option~'#1'~for~package~#2. } - { - LaTeX~has~been~asked~to~set~an~option~called~'#1'~ - but~the~#2~package~has~not~created~an~option~with~this~name. - } -\msg_kernel_new:nnnn { keys } { property-requires-value } +\__msg_kernel_new:nnnn { kernel } { property-requires-value } { The~property~'#1'~requires~a~value. } { \c_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 } +\__msg_kernel_new:nnnn { kernel } { property-unknown } { The~key~property~'#1'~is~unknown. } { \c_msg_coding_error_text_tl LaTeX~has~been~asked~to~set~the~property~'#1'~for~key~'#2':~ this~property~is~not~defined. } -\msg_kernel_new:nnnn { keys } { value-forbidden } +\__msg_kernel_new:nnnn { kernel } { value-forbidden } { The~key~'#1'~does~not~taken~a~value. } { The~key~'#1'~should~be~given~without~a~value.\\ LaTeX~will~ignore~the~given~value~'#2'. } -\msg_kernel_new:nnnn { keys } { value-required } +\__msg_kernel_new:nnnn { kernel } { value-required } { The~key~'#1'~requires~a~value. } { The~key~'#1'~must~have~a~value.\\ No~value~was~present:~the~key~will~be~ignored. } +\cs_new_eq:NN \c_keys_code_root_tl \c__keys_code_root_tl %% %% %% End of file `l3keys.sty'. |