[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Merge branch 'hotfix/gh864' into develop (afd022e6)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Jun 20 14:02:16 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/afd022e6f76c2eca27ef06899c769afbbfe576d3

>---------------------------------------------------------------

commit afd022e6f76c2eca27ef06899c769afbbfe576d3
Merge: 93f0116a d2937550
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Jun 20 13:02:16 2022 +0100

    Merge branch 'hotfix/gh864' into develop


>---------------------------------------------------------------

afd022e6f76c2eca27ef06899c769afbbfe576d3
 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 5d35d816,b0e4d5df..2a9e7503
--- a/base/changes.txt
+++ b/base/changes.txt
@@@ -10,11 -10,11 +10,16 @@@ 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.