diff options
author | Norbert Preining <norbert@preining.info> | 2022-06-18 03:01:31 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-06-18 03:01:31 +0000 |
commit | 6864115d88342e22800eb415b70bdffaed2ca3c4 (patch) | |
tree | 87d415818851f635a14e22894ef6aa240991e067 /macros/latex-dev/base/ltkeys.dtx | |
parent | f9418ac1e9385653cfa09da311bb2d405a936334 (diff) |
CTAN sync 202206180301
Diffstat (limited to 'macros/latex-dev/base/ltkeys.dtx')
-rw-r--r-- | macros/latex-dev/base/ltkeys.dtx | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/macros/latex-dev/base/ltkeys.dtx b/macros/latex-dev/base/ltkeys.dtx index 00c2600289..c6dfa5f6dd 100644 --- a/macros/latex-dev/base/ltkeys.dtx +++ b/macros/latex-dev/base/ltkeys.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltkeys.dtx} - [2022/02/21 v1.0f LaTeX Kernel (Kevyal options)] + [2022/06/16 v1.0g LaTeX Kernel (Kevyal options)] % \iffalse \documentclass{l3doc} \GetFileInfo{ltkeys.dtx} @@ -277,6 +277,9 @@ % \end{macro} % % \begin{macro}{\@@_options_class:n} +% \changes{v1.0g}{2022/06/16}{Better handling of option removal} +% \begin{macro}{\@@_options_remove:nnn} +% \changes{v1.0g}{2022/06/16}{New function} % For classes, each option (stripped of any content after |=|) % is checked for existence as a key. If found, the option is added to % the combined list for processing. On the other hand, unused options @@ -296,18 +299,26 @@ { \clist_map_inline:cn { opt@ \@currname . \@currext } { - \keys_if_exist:neTF - {#1} { \@@_remove_equals:n {##1} } - { \clist_put_right:Nn \l_@@_options_clist {##1} } - { \clist_put_right:Nn \@unusedoptionlist {##1} } + \@@_options_remove:enn + { \@@_remove_equals:n {##1} } + {##1} {#1} } } } } +\cs_new_protected:Npn \@@_options_remove:nnn #1#2#3 + { + \keys_if_exist:nnTF {#3} {#1} + { \clist_put_right:Nn \l_@@_options_clist {#2} } + { \clist_put_right:Nn \@unusedoptionlist {#1} } + } +\cs_generate_variant:Nn \@@_options_remove:nnn { e } % \end{macrocode} % \end{macro} +% \end{macro} % % \begin{macro}{\@@_options_package:n} +% \changes{v1.0g}{2022/06/16}{Better handling of option removal} % For global options when processing a package, the tasks are slightly % different from those for a class. The check is the same, but here % there is nothing to do if the option is not applicable. Each valid @@ -317,11 +328,9 @@ { \clist_map_inline:Nn \@classoptionslist { - \keys_if_exist:neT {#1} { \@@_remove_equals:n {##1} } - { - \clist_put_right:Nn \l_@@_options_clist {##1} - \clist_remove_all:Nn \@unusedoptionlist {##1} - } + \@@_options_remove:enn + { \@@_remove_equals:n {##1} } + {##1} {#1} } } % \end{macrocode} |