diff options
Diffstat (limited to 'macros/latex-dev/base/ltkeys.dtx')
-rw-r--r-- | macros/latex-dev/base/ltkeys.dtx | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/macros/latex-dev/base/ltkeys.dtx b/macros/latex-dev/base/ltkeys.dtx index 3c58585de9..0ff3d9cfa3 100644 --- a/macros/latex-dev/base/ltkeys.dtx +++ b/macros/latex-dev/base/ltkeys.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltkeys.dtx} - [2021/11/30 v1.0a LaTeX Kernel (Kevyal options)] + [2022/02/04 v1.0b LaTeX Kernel (Kevyal options)] % \iffalse \documentclass{l3doc} \GetFileInfo{ltkeys.dtx} @@ -70,6 +70,7 @@ % % The basic properties provided here are % \begin{itemize} +% \item \texttt{.code} --- execute arbitrary code % \item \texttt{.if} --- sets a \TeX{} \cs{if...} switch % \item \texttt{.store} --- stores a value in a macro % \item \texttt{.usage} -- defines whether the option can be given only @@ -149,6 +150,32 @@ \ExplSyntaxOn % \end{macrocode} % +% \subsection{Key properties} +% +% \begin{macro}{.code, .if, .store, .usage} +% \begin{macrocode} +\group_begin: + \cs_set_protected:Npn \@@_tmp:nn #1#2 + { + \quark_if_recursion_tail_stop:n {#1} + \cs_new_eq:cc + { \c_@@_props_root_str . #2 } + { \c_@@_props_root_str . #1 } + \@@_tmp:nn + } + \@@_tmp:nn + { code } { code } + { legacy_if_set:n } { if } + { tl_set:N } { store } + { usage:n } { usage } + { \q_recursion_tail } { } + \q_recursion_stop +\group_end: +% \end{macrocode} +% \end{macro} +% +% \subsection{Main mechanism} +% % \begin{macrocode} \cs_generate_variant:Nn \clist_put_right:Nn { Nv } % \end{macrocode} @@ -170,6 +197,8 @@ % \end{variable} % % \begin{macro}{\@@_options:Nn, \@@_options:NV} +% \changes{v1.0b}{2022/01/15} +% {Clear option list in end-of-package hook} % \begin{macro}{\@@_options_end:} % The main function calls functions to collect up the global and local % options into \cs{l_@@_options_clist} before calling the @@ -204,7 +233,7 @@ \bool_set_true:N \l_@@_options_loading_bool \keys_set:nV {#2} \l_@@_options_clist \bool_set_false:N \l_@@_options_loading_bool - \cs_set_eq:NN \@unprocessedoptions \scan_stop: + \AtEndOfPackage { \cs_set_eq:NN \@unprocessedoptions \scan_stop: } \@@_option_end: \@@_options_loaded:n {#2} } |