diff options
Diffstat (limited to 'macros/latex-dev/required/l3kernel/l3keys.dtx')
-rw-r--r-- | macros/latex-dev/required/l3kernel/l3keys.dtx | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/macros/latex-dev/required/l3kernel/l3keys.dtx b/macros/latex-dev/required/l3kernel/l3keys.dtx index 3291f086e2..db580c525c 100644 --- a/macros/latex-dev/required/l3kernel/l3keys.dtx +++ b/macros/latex-dev/required/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2024-06-19} +% \date{Released 2024-07-20} % % \maketitle % @@ -649,15 +649,13 @@ % { key } % Name of choice key % { choice-a , choice-b , choice-c } % Valid choices % { \exp_not:n {#1} } % Invalid choice given -% % -% % % } % \end{verbatim} % % Multiple choices are created in a very similar manner to mutually-exclusive % choices, using the properties \texttt{.multichoice:} and % \texttt{.multichoices:nn}. As with mutually exclusive choices, multiple -% choices are define as sub-keys. Thus both +% choices are defined as sub-keys. Thus both % \begin{verbatim} % \keys_define:nn { mymodule } % { @@ -1926,19 +1924,21 @@ % \end{macro} % % \begin{macro}{\@@_define_code:n} -% \begin{macro}[EXP]{\@@_define_code:TF} +% \begin{macro}[EXP]{\@@_define_code:nnn} % \begin{macro}[EXP]{\@@_define_code:w} % Two possible cases. If there is a value for the key, then just use % the function. If not, then a check to make sure there is no need for % a value with the property. If there should be one then complain, -% otherwise execute it. There is no need to check for a |:| as if it -% was missing the earlier tests would have failed. +% otherwise execute it. For a \LaTeXe{} property like |.code| which +% doesn't contain a |:|, treat it as having arity 1 and pass the +% (empty) value to it. % \begin{macrocode} \cs_new_protected:Npn \@@_define_code:n #1 { \bool_if:NTF \l_@@_no_value_bool { - \@@_define_code:TF + \@@_define_code:nnn + { \use:c { \c_@@_props_root_str \l_@@_property_str } {#1} } { \use:c { \c_@@_props_root_str \l_@@_property_str } } { \msg_error:nnee { keys } { property-requires-value } @@ -1947,7 +1947,7 @@ } { \use:c { \c_@@_props_root_str \l_@@_property_str } {#1} } } -\cs_new:Npe \@@_define_code:TF +\cs_new:Npe \@@_define_code:nnn { \exp_not:N \exp_after:wN \exp_not:N \@@_define_code:w \exp_not:N \l_@@_property_str @@ -1959,7 +1959,15 @@ \cs_new:Npn \exp_not:N \@@_define_code:w #1 \c_colon_str #2 \c_colon_str #3 \exp_not:N \s_@@_stop } - { \tl_if_empty:nTF {#2} } + { + \tl_if_empty:nTF {#3} + { \use_i:nnn } + { + \tl_if_empty:nTF {#2} + { \use_ii:nnn } + { \use_iii:nnn } + } + } % \end{macrocode} % \end{macro} % \end{macro} |