[latex3-commits] [git/LaTeX3-latex3-latex3] main: Only remove key name from \@unusedoptionlist (aa9ffb3c7)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Jun 16 08:15:16 CEST 2022
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/aa9ffb3c777a0163a027eac3ccbc74d95058b9d9
>---------------------------------------------------------------
commit aa9ffb3c777a0163a027eac3ccbc74d95058b9d9
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Jun 16 07:15:16 2022 +0100
Only remove key name from \@unusedoptionlist
>---------------------------------------------------------------
aa9ffb3c777a0163a027eac3ccbc74d95058b9d9
l3packages/CHANGELOG.md | 3 +++
l3packages/l3keys2e/l3keys2e.dtx | 22 ++++++++++++++--------
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/l3packages/CHANGELOG.md b/l3packages/CHANGELOG.md
index 60b683801..68605fa0c 100644
--- a/l3packages/CHANGELOG.md
+++ b/l3packages/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Changed
+- Only remove key name part from `\@unusedoptionlist`
+
## [2022-06-07]
### Fixed
diff --git a/l3packages/l3keys2e/l3keys2e.dtx b/l3packages/l3keys2e/l3keys2e.dtx
index c1c56bb80..ac05e1c93 100644
--- a/l3packages/l3keys2e/l3keys2e.dtx
+++ b/l3packages/l3keys2e/l3keys2e.dtx
@@ -230,6 +230,7 @@
% \end{macro}
%
% \begin{macro}{\@@_latexe_options_class:n}
+% \begin{macro}{\@@_latexe_options_remove:nnn, \@@_latexe_options_remove:xnn}
% 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
@@ -249,13 +250,20 @@
{
\clist_map_inline:cn { opt@ \@currname . \@currext }
{
- \keys_if_exist:nxTF {#1} { \@@_latexe_remove_equals:n {##1} }
- { \clist_put_right:Nn \l_@@_latexe_options_clist {##1} }
- { \clist_put_right:Nn \@unusedoptionlist {##1} }
+ \@@_latexe_options_remove:xnn
+ { \@@_latexe_remove_equals:n {##1} }
+ {##1} {#1}
}
}
}
}
+\cs_new_protected:Npn \@@_latexe_options_remove:nnn #1#2#3
+ {
+ \keys_if_exist:nnTF {#3} {#1}
+ { \clist_put_right:Nn \l_@@_latexe_options_clist {#2} }
+ { \clist_put_right:Nn \@unusedoptionlist {#1} }
+ }
+\cs_generate_variant:Nn \@@_latexe_options_remove:nnn { x }
% \end{macrocode}
% \end{macro}
%
@@ -269,11 +277,9 @@
{
\clist_map_inline:Nn \@classoptionslist
{
- \keys_if_exist:nxT {#1} { \@@_latexe_remove_equals:n {##1} }
- {
- \clist_put_right:Nn \l_@@_latexe_options_clist {##1}
- \clist_remove_all:Nn \@unusedoptionlist {##1}
- }
+ \@@_latexe_options_remove:xnn
+ { \@@_latexe_remove_equals:n {##1} }
+ {##1} {#1}
}
}
% \end{macrocode}
More information about the latex3-commits
mailing list.