[latex3-commits] [git/LaTeX3-latex3-latex2e] main: Merge branch 'hotfix/gh864' into main (b1a0d374)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Jun 20 13:58:52 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : main
Link : https://github.com/latex3/latex2e/commit/b1a0d3749ee2fba907f1b126d3be267083d53ecb
>---------------------------------------------------------------
commit b1a0d3749ee2fba907f1b126d3be267083d53ecb
Merge: 8b67835d d2937550
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Jun 20 12:58:52 2022 +0100
Merge branch 'hotfix/gh864' into main
>---------------------------------------------------------------
b1a0d3749ee2fba907f1b126d3be267083d53ecb
base/changes.txt | 5 +++++
base/ltkeys.dtx | 24 ++++++++++++++++++------
base/testfiles/github-0864.lvt | 18 ++++++++++++++++++
base/testfiles/{tlb2157.tlg => github-0864.tlg} | 5 ++---
base/testfiles/github-0864a.lvt | 18 ++++++++++++++++++
base/testfiles/{tlb2157.tlg => github-0864a.tlg} | 5 ++---
6 files changed, 63 insertions(+), 12 deletions(-)
diff --cc base/changes.txt
index a31ee463,b0e4d5df..e3bf3ebc
--- a/base/changes.txt
+++ b/base/changes.txt
@@@ -10,12 -10,11 +10,17 @@@ are not part of the distribution
All changes above are only part of the development branch for the next release.
================================================================================
+
+2022-06-20 Joseph Wright <Joseph.Wright at latex-project.org>
+
+ * ltkeys.dtx (subsection{Main mechanism})
+ Use raw options data for keyval handling
+
+ 2022-06-19 Joseph Wright <Joseph.Wright at latex-proejct.org>
+
+ * ltkeys.dtx (subsection{Main mechanism})
+ Correct approach to removing keys from \@unusedoptionlist
+
#########################
# 2022-06-01 PL1 Release
#########################
diff --cc base/ltkeys.dtx
index f3bc4942,ac937201..b83db192
--- a/base/ltkeys.dtx
+++ b/base/ltkeys.dtx
@@@ -279,9 -278,9 +279,10 @@@
%
% \begin{macro}{\@@_options_class:n}
% \changes{v1.0g}{2022/06/16}{Better handling of option removal}
+ % \changes{v1.0h}{2022/06/19}{Further work on handling of option removal}
+% \changes{v1.0h}{2022/06/20}{Use raw options data}
- % \begin{macro}{\@@_options_remove:nnn}
- % \changes{v1.0g}{2022/06/16}{New function}
+ % \begin{macro}{\@@_options_class:nnn}
+ % \changes{v1.0h}{2022/06/19}{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,12 -295,12 +297,12 @@@
\keys_if_exist:nnTF {#1} { unknown }
{
\clist_put_right:Nv \l_@@_options_clist
- { opt@ \@currname . \@currext }
+ { @raw at opt@ \@currname . \@currext }
}
{
- \clist_map_inline:cn { opt@ \@currname . \@currext }
+ \clist_map_inline:cn { @raw at opt@ \@currname . \@currext }
{
- \@@_options_remove:enn
+ \exp_args:Ne \@@_options_class:nnn
{ \@@_remove_equals:n {##1} }
{##1} {#1}
}
@@@ -321,7 -319,9 +321,10 @@@
%
% \begin{macro}{\@@_options_package:n}
% \changes{v1.0g}{2022/06/16}{Better handling of option removal}
+ % \changes{v1.0h}{2022/06/19}{Further work on handling of option removal}
+% \changes{v1.0h}{2022/06/20}{Use raw options data}
+ % \begin{macro}{\@@_options_package:nnn}
+ % \changes{v1.0h}{2022/06/19}{New function}
% 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
@@@ -329,18 -329,26 +332,27 @@@
% \begin{macrocode}
\cs_new_protected:Npn \@@_options_package:n #1
{
- \clist_map_inline:Nn \@classoptionslist
+ \clist_map_inline:Nn \@raw at classoptionslist
{
- \@@_options_remove:enn
+ \exp_args:Ne \@@_options_package:nnn
{ \@@_remove_equals:n {##1} }
{##1} {#1}
}
}
+ \cs_new_protected:Npn \@@_options_package:nnn #1#2#3
+ {
+ \keys_if_exist:nnT {#3} {#1}
+ {
+ \clist_put_right:Nn \l_@@_options_clist {#2}
+ \clist_remove_all:Nn \@unusedoptionlist {#1}
+ }
+ }
% \end{macrocode}
% \end{macro}
+ % \end{macro}
%
% \begin{macro}{\@@_options_local:}
+% \changes{v1.0h}{2022/06/20}{Use raw options data}
% If local options are found, the are added to the processing list.
% \LaTeXe{} stores options for each file in a macro which may or may not
% exist, hence the need to use \cs{cs_if_exist:c}.
More information about the latex3-commits
mailing list.