diff options
author | Norbert Preining <norbert@preining.info> | 2023-10-11 03:02:59 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-10-11 03:02:59 +0000 |
commit | 366cf31a771ded1f10860be3212058d48020398d (patch) | |
tree | 99ee483a9fd05dfd4ec908582abb44028bdffbd1 /macros/latex/contrib/l3kernel/l3keys.dtx | |
parent | 48eedda2cb4d2644886b862409b24a1d8e9a136f (diff) |
CTAN sync 202310110302
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3keys.dtx')
-rw-r--r-- | macros/latex/contrib/l3kernel/l3keys.dtx | 284 |
1 files changed, 166 insertions, 118 deletions
diff --git a/macros/latex/contrib/l3kernel/l3keys.dtx b/macros/latex/contrib/l3kernel/l3keys.dtx index 8a78f8cd7c..95ddcd0a38 100644 --- a/macros/latex/contrib/l3kernel/l3keys.dtx +++ b/macros/latex/contrib/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-08-29} +% \date{Released 2023-10-10} % % \maketitle % @@ -124,7 +124,8 @@ % % \section{Creating keys} % -% \begin{function}[updated = 2017-11-14]{\keys_define:nn} +% \begin{function}[updated = 2017-11-14] +% {\keys_define:nn, \keys_define:ne} % \begin{syntax} % \cs{keys_define:nn} \Arg{module} \Arg{keyval list} % \end{syntax} @@ -216,7 +217,7 @@ % \end{function} % % \begin{function}[added = 2011-08-21, updated = 2013-07-10] -% {.choices:nn, .choices:Vn, .choices:on, .choices:xn} +% {.choices:nn, .choices:Vn, .choices:en, .choices:on} % \begin{syntax} % \meta{key} .choices:nn = \Arg{choices} \Arg{code} % \end{syntax} @@ -263,7 +264,7 @@ % \end{function} % % \begin{function}[updated = 2013-07-09] -% {.default:n, .default:V, .default:o, .default:x} +% {.default:n, .default:V, .default:e, .default:o} % \begin{syntax} % \meta{key} .default:n = \Arg{default} % \end{syntax} @@ -355,7 +356,7 @@ % \end{function} % % \begin{function}[updated = 2013-07-09] -% {.initial:n, .initial:V, .initial:o, .initial:x} +% {.initial:n, .initial:V, .initial:e, .initial:o} % \begin{syntax} % \meta{key} .initial:n = \Arg{value} % \end{syntax} @@ -424,7 +425,7 @@ % \end{function} % % \begin{function}[added = 2011-08-21, updated = 2013-07-10] -% {.multichoices:nn, .multichoices:Vn, .multichoices:on, .multichoices:xn} +% {.multichoices:nn, .multichoices:Vn, .multichoices:en, .multichoices:on} % \begin{syntax} % \meta{key} .multichoices:nn \Arg{choices} \Arg{code} % \end{syntax} @@ -480,14 +481,14 @@ % at the point that the key is set up. % \end{function} % -% \begin{function}[added = 2021-10-30] -% {.str_set_x:N, .str_set_x:c, .str_gset_x:N, .str_gset_x:c} +% \begin{function}[added = 2023-09-18] +% {.str_set_e:N, .str_set_e:c, .str_gset_e:N, .str_gset_e:c} % \begin{syntax} -% \meta{key} .str_set_x:N = \meta{string variable} +% \meta{key} .str_set_e:N = \meta{string variable} % \end{syntax} % Defines \meta{key} to set \meta{string variable} to \meta{value}, -% which will be subjected to an \texttt{x}-type expansion -% (\emph{i.e.}~using \cs{str_set:Nx}). If the variable does not exist, +% which will be subjected to an \texttt{e}-type expansion +% (\emph{i.e.}~using \cs{str_set:Ne}). If the variable does not exist, % it is created globally at the point that the key is set up. % \end{function} % @@ -500,13 +501,14 @@ % at the point that the key is set up. % \end{function} % -% \begin{function}{.tl_set_x:N, .tl_set_x:c, .tl_gset_x:N, .tl_gset_x:c} +% \begin{function}[added = 2023-09-18] +% {.tl_set_e:N, .tl_set_e:c, .tl_gset_e:N, .tl_gset_e:c} % \begin{syntax} -% \meta{key} .tl_set_x:N = \meta{token list variable} +% \meta{key} .tl_set_e:N = \meta{token list variable} % \end{syntax} % Defines \meta{key} to set \meta{token list variable} to \meta{value}, -% which will be subjected to an \texttt{x}-type expansion -% (\emph{i.e.}~using \cs{tl_set:Nx}). If the variable does not exist, +% which will be subjected to an \texttt{e}-type expansion +% (\emph{i.e.}~using \cs{tl_set:Ne}). If the variable does not exist, % it is created globally at the point that the key is set up. % \end{function} % @@ -637,7 +639,7 @@ % key / choice-b .code:n = code-b, % key / choice-c .code:n = code-c, % key / unknown .code:n = -% \msg_error:nnxxx { mymodule } { unknown-choice } +% \msg_error:nneee { mymodule } { unknown-choice } % { key } % Name of choice key % { choice-a , choice-b , choice-c } % Valid choices % { \exp_not:n {#1} } % Invalid choice given @@ -724,7 +726,10 @@ % \section{Setting keys} % % \begin{function}[updated = 2017-11-14] -% {\keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no, \keys_set:nx} +% { +% \keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:ne, +% \keys_set:no, +% } % \begin{syntax} % \cs{keys_set:nn} \Arg{module} \Arg{keyval list} % \end{syntax} @@ -782,11 +787,14 @@ % \begin{function}[added = 2011-08-23, updated = 2019-01-29] % { % \keys_set_known:nn, \keys_set_known:nV, -% \keys_set_known:nv, \keys_set_known:no, +% \keys_set_known:nv, \keys_set_known:ne, +% \keys_set_known:no % \keys_set_known:nnN, \keys_set_known:nVN, -% \keys_set_known:nvN, \keys_set_known:noN, +% \keys_set_known:nvN, \keys_set_known:neN, +% \keys_set_known:noN % \keys_set_known:nnnN, \keys_set_known:nVnN, -% \keys_set_known:nvnN, \keys_set_known:nonN +% \keys_set_known:nvnN, \keys_set_known:nenN, +% \keys_set_known:nonN % } % \begin{syntax} % \cs{keys_set_known:nn} \Arg{module} \Arg{keyval list} @@ -1730,7 +1738,7 @@ % % \subsection{The key defining mechanism} % -% \begin{macro}{\keys_define:nn} +% \begin{macro}{\keys_define:nn, \keys_define:ne, \keys_define:nx} % \begin{macro}{\@@_define:nnn, \@@_define:onn} % The public function for definitions is just a wrapper for the lower % level mechanism, more or less. The outer function is designed to @@ -1739,9 +1747,10 @@ % \begin{macrocode} \cs_new_protected:Npn \keys_define:nn { \@@_define:onn \l_@@_module_str } +\cs_generate_variant:Nn \keys_define:nn { ne , nx } \cs_new_protected:Npn \@@_define:nnn #1#2#3 { - \str_set:Nx \l_@@_module_str { \@@_trim_spaces:n {#2} } + \str_set:Ne \l_@@_module_str { \@@_trim_spaces:n {#2} } \keyval_parse:NNn \@@_define:n \@@_define:nn {#3} \str_set:Nn \l_@@_module_str {#1} } @@ -1776,7 +1785,7 @@ { \str_if_empty:NF \l_@@_property_str { - \msg_error:nnxx { keys } { property-unknown } + \msg_error:nnee { keys } { property-unknown } \l_@@_property_str \l_keys_path_str } } @@ -1798,12 +1807,12 @@ % and storing the text before and after it. Everything is turned into % strings, so there is no problem using an \texttt{x}-type expansion. Since % \cs{@@_trim_spaces:n} will turn its argument into a string anyway, this -% function uses \cs{cs_set_nopar:Npx} instead of \cs{tl_set:Nx} to gain some +% function uses \cs{cs_set_nopar:Npe} instead of \cs{tl_set:Ne} to gain some % speed. % \begin{macrocode} \cs_new_protected:Npn \@@_property_find:n #1 { - \cs_set_nopar:Npx \l_@@_property_str { \@@_trim_spaces:n { #1 } } + \cs_set_nopar:Npe \l_@@_property_str { \@@_trim_spaces:n { #1 } } \exp_after:wN \@@_property_find_auxi:w \l_@@_property_str \s_@@_nil \@@_property_find_auxii:w . \s_@@_nil \@@_property_find_err:w @@ -1816,22 +1825,22 @@ #1 \s_@@_mark #2 \s_@@_nil \@@_property_find_auxii:w . \s_@@_nil \@@_property_find_err:w { - \cs_set_nopar:Npx \l_keys_path_str + \cs_set_nopar:Npe \l_keys_path_str { \str_if_empty:NF \l_@@_module_str { \l_@@_module_str / } #1 } \@@_property_find_auxi:w #2 \s_@@_nil \@@_property_find_auxiii:w . \s_@@_nil \@@_property_find_auxiv:w } \cs_new_protected:Npn \@@_property_find_auxiii:w #1 \s_@@_mark { - \cs_set_nopar:Npx \l_keys_path_str { \l_keys_path_str . #1 } + \cs_set_nopar:Npe \l_keys_path_str { \l_keys_path_str . #1 } \@@_property_find_auxi:w } \cs_new_protected:Npn \@@_property_find_auxiv:w #1 \s_@@_nil \@@_property_find_auxiii:w \s_@@_mark \s_@@_nil \@@_property_find_auxiv:w { - \cs_set_nopar:Npx \l_@@_property_str { . #1 } - \cs_set_nopar:Npx \l_keys_path_str + \cs_set_nopar:Npe \l_@@_property_str { . #1 } + \cs_set_nopar:Npe \l_keys_path_str { \exp_after:wN \@@_trim_spaces:n \exp_after:wN { \l_keys_path_str } } \tl_set_eq:NN \l_keys_path_tl \l_keys_path_str } @@ -1861,7 +1870,7 @@ \l_@@_property_str \s_@@_stop { \use:c { \c_@@_props_root_str \l_@@_property_str } } { - \msg_error:nnxx { keys } { property-requires-value } + \msg_error:nnee { keys } { property-requires-value } \l_@@_property_str \l_keys_path_str } } @@ -1896,13 +1905,13 @@ { \bool_if_exist:NF #1 { \bool_new:N #1 } \@@_choice_make: - \@@_cmd_set:nx { \l_keys_path_str / true } + \@@_cmd_set:ne { \l_keys_path_str / true } { \exp_not:c { bool_ #2 set_ #3 :N } \exp_not:N #1 } - \@@_cmd_set:nx { \l_keys_path_str / false } + \@@_cmd_set:ne { \l_keys_path_str / false } { \exp_not:c { bool_ #2 set_ #4 :N } \exp_not:N #1 } \@@_cmd_set_direct:nn { \l_keys_path_str / unknown } { - \msg_error:nnx { keys } { boolean-values-only } + \msg_error:nne { keys } { boolean-values-only } \l_keys_path_str } \@@_default_set:n { true } @@ -1932,7 +1941,7 @@ { \c_@@_type_root_str \@@_parent:o \l_keys_path_str } { choice } { - \msg_error:nnxx { keys } { nested-choice-key } + \msg_error:nnee { keys } { nested-choice-key } \l_keys_path_tl { \@@_parent:o \l_keys_path_str } } { \@@_choice_make_aux:N #1 } @@ -1946,7 +1955,7 @@ \@@_cmd_set_direct:nn \l_keys_path_str { #1 {##1} } \@@_cmd_set_direct:nn { \l_keys_path_str / unknown } { - \msg_error:nnxx { keys } { choice-unknown } + \msg_error:nnee { keys } { choice-unknown } \l_keys_path_str {##1} } } @@ -1971,7 +1980,7 @@ \clist_map_inline:nn {#2} { \int_incr:N \l_keys_choice_int - \@@_cmd_set:nx + \@@_cmd_set:ne { \l_keys_path_str / \@@_trim_spaces:n {##1} } { \tl_set:Nn \exp_not:N \l_keys_choice_tl {##1} @@ -1987,7 +1996,7 @@ % % \begin{macro} % { -% \@@_cmd_set:nn, \@@_cmd_set:nx, \@@_cmd_set:Vn, \@@_cmd_set:Vo, +% \@@_cmd_set:nn, \@@_cmd_set:Vn, \@@_cmd_set:ne, \@@_cmd_set:Vo, % \@@_cmd_set_direct:nn % } % Setting the code for a key first logs if appropriate that we are @@ -1995,7 +2004,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_cmd_set:nn #1#2 { \@@_cmd_set_direct:nn {#1} { \@@_precompile:n {#2} } } -\cs_generate_variant:Nn \@@_cmd_set:nn { nx , Vn , Vo } +\cs_generate_variant:Nn \@@_cmd_set:nn { ne , Vn , Vo } \cs_new_protected:Npn \@@_cmd_set_direct:nn #1#2 { \cs_set_protected:cpn { \c_@@_code_root_str #1 } ##1 {#2} } % \end{macrocode} @@ -2008,7 +2017,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_cs_set:NNpn #1#2#3# { - \cs_set_protected:cpx { \c_@@_code_root_str \l_keys_path_str } ##1 + \cs_set_protected:cpe { \c_@@_code_root_str \l_keys_path_str } ##1 { \@@_precompile:n { #1 \exp_not:N #2 \exp_not:n {#3} {##1} } @@ -2020,7 +2029,7 @@ % \end{macro} % % \begin{macro}{\@@_default_set:n} -% Setting a default value is easy. These are stored using \cs{cs_set_nopar:cpx} as this +% Setting a default value is easy. These are stored using \cs{cs_set_nopar:cpe} as this % avoids any worries about whether a token list exists. % \begin{macrocode} \cs_new_protected:Npn \@@_default_set:n #1 @@ -2032,7 +2041,7 @@ \tex_undefined:D } { - \cs_set_nopar:cpx + \cs_set_nopar:cpe { \c_@@_default_root_str \l_keys_path_str } { \exp_not:n {#1} } \@@_value_requirement:nn { required } { false } @@ -2114,13 +2123,13 @@ \cs_new_protected:Npn \@@_legacy_if_set:nnnn #1#2#3#4 { \@@_choice_make: - \@@_cmd_set:nx { \l_keys_path_str / true } + \@@_cmd_set:ne { \l_keys_path_str / true } { \exp_not:c { legacy_if_#2 set_ #3 :n } { \exp_not:n {#1} } } - \@@_cmd_set:nx { \l_keys_path_str / false } + \@@_cmd_set:ne { \l_keys_path_str / false } { \exp_not:c { legacy_if_#2 set_ #4 :n } { \exp_not:n {#1} } } \@@_cmd_set:nn { \l_keys_path_str / unknown } { - \msg_error:nnx { keys } { boolean-values-only } + \msg_error:nne { keys } { boolean-values-only } \l_keys_path_str } \@@_default_set:n { true } @@ -2165,7 +2174,7 @@ \prop_if_exist:NF #1 { \prop_new:N #1 } \exp_after:wN \@@_find_key_module:wNN \l_keys_path_str \s_@@_stop \l_@@_tmpa_tl \l_@@_tmpb_tl - \@@_cmd_set:nx \l_keys_path_str + \@@_cmd_set:ne \l_keys_path_str { \exp_not:c { prop_ #2 put:Nnn } \exp_not:N #1 @@ -2225,7 +2234,7 @@ } } { - \msg_error:nnx { keys } + \msg_error:nne { keys } { boolean-values-only } { .value_ #1 :n } } @@ -2234,7 +2243,7 @@ { \bool_if:NF \l_@@_no_value_bool { - \msg_error:nnxx { keys } { value-forbidden } + \msg_error:nnee { keys } { value-forbidden } \l_keys_path_str \l_keys_value_tl \use_none:nnn } @@ -2243,7 +2252,7 @@ { \bool_if:NT \l_@@_no_value_bool { - \msg_error:nnx { keys } { value-required } + \msg_error:nne { keys } { value-required } \l_keys_path_str \use_none:nnn } @@ -2294,7 +2303,7 @@ { \prop_get:NVNF #1 \l_@@_module_str \l_@@_tmpa_tl { \tl_clear:N \l_@@_tmpa_tl } - \tl_set:Nx \l_@@_tmpb_tl + \tl_set:Ne \l_@@_tmpb_tl { \exp_after:wN \@@_usage:w \l_keys_path_str \s_@@_stop } \bool_if:NTF #2 { \clist_put_right:NV \l_@@_tmpa_tl \l_@@_tmpb_tl } @@ -2316,7 +2325,7 @@ \cs_new_protected:Npn \@@_variable_set:NnnN #1#2#3#4 { \use:c { #2_if_exist:NF } #1 { \use:c { #2 _new:N } #1 } - \@@_cmd_set:nx \l_keys_path_str + \@@_cmd_set:ne \l_keys_path_str { \exp_not:c { #2 _ #3 set:N #4 } \exp_not:N #1 @@ -2386,8 +2395,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro} -% {.choices:nn, .choices:Vn, .choices:on, .choices:xn} +% \begin{macro}{.choices:nn, .choices:Vn, .choices:en, .choices:on, .choices:xn} % For auto-generation of a series of mutually-exclusive choices. % Here, |#1| consists of two separate % arguments, hence the slightly odd-looking implementation. @@ -2396,6 +2404,8 @@ { \@@_choices_make:nn #1 } \cs_new_protected:cpn { \c_@@_props_root_str .choices:Vn } #1 { \exp_args:NV \@@_choices_make:nn #1 } +\cs_new_protected:cpn { \c_@@_props_root_str .choices:en } #1 + { \exp_args:Ne \@@_choices_make:nn #1 } \cs_new_protected:cpn { \c_@@_props_root_str .choices:on } #1 { \exp_args:No \@@_choices_make:nn #1 } \cs_new_protected:cpn { \c_@@_props_root_str .choices:xn } #1 @@ -2452,13 +2462,15 @@ % \end{macro} % \end{macro} % -% \begin{macro}{.default:n, .default:V, .default:o, .default:x} +% \begin{macro}{.default:n, .default:V, .default:e, .default:o, .default:x} % Expansion is left to the internal functions. % \begin{macrocode} \cs_new_protected:cpn { \c_@@_props_root_str .default:n } #1 { \@@_default_set:n {#1} } \cs_new_protected:cpn { \c_@@_props_root_str .default:V } #1 { \exp_args:NV \@@_default_set:n #1 } +\cs_new_protected:cpn { \c_@@_props_root_str .default:e } #1 + { \exp_args:Ne \@@_default_set:n {#1} } \cs_new_protected:cpn { \c_@@_props_root_str .default:o } #1 { \exp_args:No \@@_default_set:n {#1} } \cs_new_protected:cpn { \c_@@_props_root_str .default:x } #1 @@ -2514,13 +2526,15 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{.initial:n, .initial:V, .initial:o, .initial:x} +% \begin{macro}{.initial:n, .initial:V, .initial:e, .initial:o, .initial:x} % The standard hand-off approach. % \begin{macrocode} \cs_new_protected:cpn { \c_@@_props_root_str .initial:n } #1 { \@@_initialise:n {#1} } \cs_new_protected:cpn { \c_@@_props_root_str .initial:V } #1 { \exp_args:NV \@@_initialise:n #1 } +\cs_new_protected:cpn { \c_@@_props_root_str .initial:e } #1 + { \exp_args:Ne \@@_initialise:n {#1} } \cs_new_protected:cpn { \c_@@_props_root_str .initial:o } #1 { \exp_args:No \@@_initialise:n {#1} } \cs_new_protected:cpn { \c_@@_props_root_str .initial:x } #1 @@ -2579,11 +2593,7 @@ % \end{macro} % % \begin{macro}{.multichoice:} -% \begin{macro} -% { -% .multichoices:nn, .multichoices:Vn, .multichoices:on, -% .multichoices:xn, -% } +% \begin{macro}{.multichoices:nn, .multichoices:Vn, .multichoices:en, .multichoices:on, .multichoices:xn} % The same idea as \texttt{.choice:} and \texttt{.choices:nn}, but % where more than one choice is allowed. % \begin{macrocode} @@ -2593,6 +2603,8 @@ { \@@_multichoices_make:nn #1 } \cs_new_protected:cpn { \c_@@_props_root_str .multichoices:Vn } #1 { \exp_args:NV \@@_multichoices_make:nn #1 } +\cs_new_protected:cpn { \c_@@_props_root_str .multichoices:en } #1 + { \exp_args:Ne \@@_multichoices_make:nn #1 } \cs_new_protected:cpn { \c_@@_props_root_str .multichoices:on } #1 { \exp_args:No \@@_multichoices_make:nn #1 } \cs_new_protected:cpn { \c_@@_props_root_str .multichoices:xn } #1 @@ -2647,26 +2659,26 @@ % % \begin{macro}{.str_set:N, .str_set:c} % \begin{macro}{.str_gset:N, .str_gset:c} -% \begin{macro}{.str_set_x:N, .str_set_x:c} -% \begin{macro}{.str_gset_x:N, .str_gset_x:c} +% \begin{macro}{.str_set_e:N, .str_set_e:c} +% \begin{macro}{.str_gset_e:N, .str_gset_e:c} % Setting a variable is very easy: just pass the data along. % \begin{macrocode} \cs_new_protected:cpn { \c_@@_props_root_str .str_set:N } #1 { \@@_variable_set:NnnN #1 { str } { } n } \cs_new_protected:cpn { \c_@@_props_root_str .str_set:c } #1 { \@@_variable_set:cnnN {#1} { str } { } n } -\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:N } #1 - { \@@_variable_set:NnnN #1 { str } { } x } -\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:c } #1 - { \@@_variable_set:cnnN {#1} { str } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_set_e:N } #1 + { \@@_variable_set:NnnN #1 { str } { } e } +\cs_new_protected:cpn { \c_@@_props_root_str .str_set_e:c } #1 + { \@@_variable_set:cnnN {#1} { str } { } e } \cs_new_protected:cpn { \c_@@_props_root_str .str_gset:N } #1 { \@@_variable_set:NnnN #1 { str } { g } n } \cs_new_protected:cpn { \c_@@_props_root_str .str_gset:c } #1 { \@@_variable_set:cnnN {#1} { str } { g } n } -\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:N } #1 - { \@@_variable_set:NnnN #1 { str } { g } x } -\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:c } #1 - { \@@_variable_set:cnnN {#1} { str } { g } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_e:N } #1 + { \@@_variable_set:NnnN #1 { str } { g } e } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_e:c } #1 + { \@@_variable_set:cnnN {#1} { str } { g } e } % \end{macrocode} % \end{macro} % \end{macro} @@ -2675,26 +2687,26 @@ % % \begin{macro}{.tl_set:N, .tl_set:c} % \begin{macro}{.tl_gset:N, .tl_gset:c} -% \begin{macro}{.tl_set_x:N, .tl_set_x:c} -% \begin{macro}{.tl_gset_x:N, .tl_gset_x:c} +% \begin{macro}{.tl_set_e:N, .tl_set_e:c} +% \begin{macro}{.tl_gset_e:N, .tl_gset_e:c} % Setting a variable is very easy: just pass the data along. % \begin{macrocode} \cs_new_protected:cpn { \c_@@_props_root_str .tl_set:N } #1 { \@@_variable_set:NnnN #1 { tl } { } n } \cs_new_protected:cpn { \c_@@_props_root_str .tl_set:c } #1 { \@@_variable_set:cnnN {#1} { tl } { } n } -\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_x:N } #1 - { \@@_variable_set:NnnN #1 { tl } { } x } -\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_x:c } #1 - { \@@_variable_set:cnnN {#1} { tl } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_e:N } #1 + { \@@_variable_set:NnnN #1 { tl } { } e } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_e:c } #1 + { \@@_variable_set:cnnN {#1} { tl } { } e } \cs_new_protected:cpn { \c_@@_props_root_str .tl_gset:N } #1 { \@@_variable_set:NnnN #1 { tl } { g } n } \cs_new_protected:cpn { \c_@@_props_root_str .tl_gset:c } #1 { \@@_variable_set:cnnN {#1} { tl } { g } n } -\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_x:N } #1 - { \@@_variable_set:NnnN #1 { tl } { g } x } -\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_x:c } #1 - { \@@_variable_set:cnnN {#1} { tl } { g } x } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_e:N } #1 + { \@@_variable_set:NnnN #1 { tl } { g } e } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_e:c } #1 + { \@@_variable_set:cnnN {#1} { tl } { g } e } % \end{macrocode} % \end{macro} % \end{macro} @@ -2732,7 +2744,8 @@ % % \begin{macro} % { -% \keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:no, \keys_set:nx, +% \keys_set:nn, \keys_set:nV, \keys_set:nv, \keys_set:ne, +% \keys_set:no, \keys_set:nx, % \@@_set:nn % } % \begin{macro}{\@@_set:nnn} @@ -2740,7 +2753,7 @@ % \begin{macrocode} \cs_new_protected:Npn \keys_set:nn #1#2 { - \use:x + \use:e { \bool_set_false:N \exp_not:N \l_@@_only_known_bool \bool_set_false:N \exp_not:N \l_@@_filtered_bool @@ -2758,12 +2771,12 @@ { \exp_not:o \l_@@_relative_tl } } } -\cs_generate_variant:Nn \keys_set:nn { nV , nv , no , nx } +\cs_generate_variant:Nn \keys_set:nn { nV , nv , ne , no , nx } \cs_new_protected:Npn \@@_set:nn #1#2 { \exp_args:No \@@_set:nnn \l_@@_module_str {#1} {#2} } \cs_new_protected:Npn \@@_set:nnn #1#2#3 { - \str_set:Nx \l_@@_module_str { \@@_trim_spaces:n {#2} } + \str_set:Ne \l_@@_module_str { \@@_trim_spaces:n {#2} } \keyval_parse:NNn \@@_set_keyval:n \@@_set_keyval:nn {#3} \str_set:Nn \l_@@_module_str {#1} } @@ -2774,18 +2787,21 @@ % \begin{macro} % { % \keys_set_known:nnN, \keys_set_known:nVN, -% \keys_set_known:nvN, \keys_set_known:noN +% \keys_set_known:nvN, \keys_set_known:neN, +% \keys_set_known:noN % } % \begin{macro} % { % \keys_set_known:nnnN, \keys_set_known:nVnN, -% \keys_set_known:nvnN, \keys_set_known:nonN +% \keys_set_known:nvnN, \keys_set_known:nenN, +% \keys_set_known:nonN % } % \begin{macro}{\@@_set_known:nnnnN} % \begin{macro} % { % \keys_set_known:nn, \keys_set_known:nV, -% \keys_set_known:nv, \keys_set_known:no +% \keys_set_known:nv, \keys_set_known:ne, +% \keys_set_known:no % } % \begin{macro}{\@@_set_known:nnn} % Setting known keys simply means setting the appropriate flag, then @@ -2799,26 +2815,26 @@ \exp_args:No \@@_set_known:nnnnN \l_@@_unused_clist \q_@@_no_value {#1} {#2} #3 } -\cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , no } +\cs_generate_variant:Nn \keys_set_known:nnN { nV , nv , ne , no } \cs_new_protected:Npn \keys_set_known:nnnN #1#2#3#4 { \exp_args:No \@@_set_known:nnnnN \l_@@_unused_clist {#3} {#1} {#2} #4 } -\cs_generate_variant:Nn \keys_set_known:nnnN { nV , nv , no } +\cs_generate_variant:Nn \keys_set_known:nnnN { nV , nv , ne , no } \cs_new_protected:Npn \@@_set_known:nnnnN #1#2#3#4#5 { \clist_clear:N \l_@@_unused_clist \@@_set_known:nnn {#2} {#3} {#4} - \__kernel_tl_set:Nx #5 { \exp_not:o \l_@@_unused_clist } + \__kernel_tl_set:Ne #5 { \exp_not:o \l_@@_unused_clist } \tl_set:Nn \l_@@_unused_clist {#1} } \cs_new_protected:Npn \keys_set_known:nn #1#2 { \@@_set_known:nnn \q_@@_no_value {#1} {#2} } -\cs_generate_variant:Nn \keys_set_known:nn { nV , nv , no } +\cs_generate_variant:Nn \keys_set_known:nn { nV , nv , ne , no } \cs_new_protected:Npn \@@_set_known:nnn #1#2#3 { - \use:x + \use:e { \bool_set_true:N \exp_not:N \l_@@_only_known_bool \bool_set_false:N \exp_not:N \l_@@_filtered_bool @@ -2888,7 +2904,7 @@ { \clist_clear:N \l_@@_unused_clist \@@_set_filter:nnnn {#2} {#3} {#4} {#5} - \__kernel_tl_set:Nx #6 { \exp_not:o \l_@@_unused_clist } + \__kernel_tl_set:Ne #6 { \exp_not:o \l_@@_unused_clist } \tl_set:Nn \l_@@_unused_clist {#1} } \cs_new_protected:Npn \keys_set_filter:nnn #1#2#3 @@ -2896,7 +2912,7 @@ \cs_generate_variant:Nn \keys_set_filter:nnn { nnV , nnv , nno } \cs_new_protected:Npn \@@_set_filter:nnnn #1#2#3#4 { - \use:x + \use:e { \bool_set_false:N \exp_not:N \l_@@_only_known_bool \bool_set_true:N \exp_not:N \l_@@_filtered_bool @@ -2915,7 +2931,7 @@ } \cs_new_protected:Npn \keys_set_groups:nnn #1#2#3 { - \use:x + \use:e { \bool_set_false:N \exp_not:N \l_@@_only_known_bool \bool_set_false:N \exp_not:N \l_@@_filtered_bool @@ -3001,7 +3017,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_set_keyval:nnn #1#2#3 { - \__kernel_tl_set:Nx \l_keys_path_str + \__kernel_tl_set:Ne \l_keys_path_str { \tl_if_blank:nF {#1} { #1 / } @@ -3020,7 +3036,7 @@ } \cs_generate_variant:Nn \@@_set_keyval:nnn { o } % \end{macrocode} -% This function uses \cs{cs_set_nopar:Npx} internally for performance reasons, +% This function uses \cs{cs_set_nopar:Npe} internally for performance reasons, % the argument |#1| is already a string in every usage, so turning it into a % string again seems unnecessary. % \begin{macrocode} @@ -3036,12 +3052,12 @@ \cs_new_protected:Npn \@@_find_key_module_auxii:Nw #1 #2 \s_@@_mark #3 \s_@@_nil \@@_find_key_module_auxii:Nw { - \cs_set_nopar:Npx #1 { \tl_if_empty:NF #1 { #1 / } #2 } + \cs_set_nopar:Npe #1 { \tl_if_empty:NF #1 { #1 / } #2 } \@@_find_key_module_auxi:Nw #1 #3 \s_@@_nil \@@_find_key_module_auxiii:Nw } \cs_new_protected:Npn \@@_find_key_module_auxiii:Nw #1 #2 \s_@@_mark { - \cs_set_nopar:Npx #1 { \tl_if_empty:NF #1 { #1 / } #2 } + \cs_set_nopar:Npe #1 { \tl_if_empty:NF #1 { #1 / } #2 } \@@_find_key_module_auxi:Nw #1 } \cs_new_protected:Npn \@@_find_key_module_auxiv:Nw @@ -3209,7 +3225,7 @@ { \c_@@_code_root_str \l_@@_module_str / unknown } { \@@_execute:no { \l_@@_module_str / unknown } \l_keys_value_tl } { - \msg_error:nnxx { keys } { unknown } + \msg_error:nnee { keys } { unknown } \l_keys_path_str \l_@@_module_str } } @@ -3248,7 +3264,7 @@ { \@@_quark_if_no_value:NTF \l_@@_relative_tl { - \clist_put_right:Nx \l_@@_unused_clist + \clist_put_right:Ne \l_@@_unused_clist { \l_keys_key_str \bool_if:NF \l_@@_no_value_bool @@ -3258,7 +3274,7 @@ { \tl_if_empty:NTF \l_@@_relative_tl { - \clist_put_right:Nx \l_@@_unused_clist + \clist_put_right:Ne \l_@@_unused_clist { \l_keys_path_str \bool_if:NF \l_@@_no_value_bool @@ -3270,30 +3286,30 @@ } \cs_new_protected:Npn \@@_store_unused_aux: { - \__kernel_tl_set:Nx \l_@@_relative_tl + \__kernel_tl_set:Ne \l_@@_relative_tl { \exp_args:No \@@_trim_spaces:n \l_@@_relative_tl } - \use:x + \use:e { \cs_set_protected:Npn \@@_store_unused:w - ####1 \l_@@_relative_tl / - ####2 \l_@@_relative_tl / - ####3 \s_@@_stop + ##1 \l_@@_relative_tl / + ##2 \l_@@_relative_tl / + ##3 \s_@@_stop } { \tl_if_blank:nF {##1} { - \msg_error:nnxx { keys } { bad-relative-key-path } + \msg_error:nnee { keys } { bad-relative-key-path } \l_keys_path_str \l_@@_relative_tl } - \clist_put_right:Nx \l_@@_unused_clist + \clist_put_right:Ne \l_@@_unused_clist { \exp_not:n {##2} \bool_if:NF \l_@@_no_value_bool { = { \exp_not:o \l_keys_value_tl } } } } - \use:x + \use:e { \@@_store_unused:w \l_keys_path_str \l_@@_relative_tl / \l_@@_relative_tl / @@ -3458,9 +3474,9 @@ % To show a key, show its code using a message. % \begin{macrocode} \cs_new_protected:Npn \keys_show:nn - { \@@_show:Nnn \msg_show:nnxxxx } + { \@@_show:Nnn \msg_show:nneeee } \cs_new_protected:Npn \keys_log:nn - { \@@_show:Nnn \msg_log:nnxxxx } + { \@@_show:Nnn \msg_log:nneeee } \cs_new_protected:Npn \@@_show:Nnn #1#2#3 { #1 { keys } { show-key } @@ -3483,7 +3499,7 @@ } { } { } } -\cs_new:Npx \@@_show:n #1 +\cs_new:Npe \@@_show:n #1 { \exp_not:N \@@_show:w #1 @@ -3492,21 +3508,21 @@ \tl_to_str:n { \@@_precompile:n } \exp_not:N \s_@@_stop } -\use:x +\use:e { \cs_new:Npn \exp_not:N \@@_show:w - ##1 \tl_to_str:n { \@@_precompile:n } - ##2 \tl_to_str:n { \@@_precompile:n } - ##3 \exp_not:N \s_@@_stop + #1 \tl_to_str:n { \@@_precompile:n } + #2 \tl_to_str:n { \@@_precompile:n } + #3 \exp_not:N \s_@@_stop } { \tl_if_blank:nTF {#2} {#1} { \@@_show:Nw #2 \s_@@_stop } } -\use:x +\use:e { - \cs_new:Npn \exp_not:N \@@_show:Nw ##1##2 + \cs_new:Npn \exp_not:N \@@_show:Nw #1#2 \c_right_brace_str \exp_not:N \s_@@_stop } {#2} @@ -3568,6 +3584,38 @@ \prop_gput:Nnn \g_msg_module_type_prop { keys } { } % \end{macrocode} % +% \subsection{Deprecated functions} +% +% \begin{macro}{.str_set_x:N, .str_set_x:c} +% \begin{macro}{.str_gset_x:N, .str_gset_x:c} +% \begin{macrocode} +\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:N } #1 + { \@@_variable_set:NnnN #1 { str } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_set_x:c } #1 + { \@@_variable_set:cnnN {#1} { str } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:N } #1 + { \@@_variable_set:NnnN #1 { str } { g } x } +\cs_new_protected:cpn { \c_@@_props_root_str .str_gset_x:c } #1 + { \@@_variable_set:cnnN {#1} { str } { g } x } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{.tl_set_x:N, .tl_set_x:c} +% \begin{macro}{.tl_gset_x:N, .tl_gset_x:c} +% \begin{macrocode} +\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_x:N } #1 + { \@@_variable_set:NnnN #1 { tl } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_set_x:c } #1 + { \@@_variable_set:cnnN {#1} { tl } { } x } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_x:N } #1 + { \@@_variable_set:NnnN #1 { tl } { g } x } +\cs_new_protected:cpn { \c_@@_props_root_str .tl_gset_x:c } #1 + { \@@_variable_set:cnnN {#1} { tl } { g } x } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macrocode} %</package> % \end{macrocode} |