[latex3-commits] [git/LaTeX3-latex3-latex2e] keyval-tuneup: Define key option handler in ltkeys (8fd3b928)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Oct 20 12:20:14 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : keyval-tuneup
Link : https://github.com/latex3/latex2e/commit/8fd3b928536a2e63a1d4a3b836b3c5415028ed61
>---------------------------------------------------------------
commit 8fd3b928536a2e63a1d4a3b836b3c5415028ed61
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Oct 20 11:19:41 2022 +0100
Define key option handler in ltkeys
>---------------------------------------------------------------
8fd3b928536a2e63a1d4a3b836b3c5415028ed61
base/changes.txt | 4 +++-
base/ltclass.dtx | 10 +++++-----
base/ltkeys.dtx | 5 ++++-
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index af3556c0..85897c45 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -8,7 +8,9 @@ are not part of the distribution.
2022-10-20 Joseph Wright <Joseph.Wright at latex-project.org>
- * ltkeys.dtx: Correct an argument for a message
+ * ltclass.dtx, ltkeys.dtx:
+ Correct an argument for a message
+ Define key option handler in ltkeys
2022-10-10 David Carlisle <David.Carlisle at latex-project.org>
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 72dc9f98..41624bb4 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2022/10/10 v1.5d LaTeX Kernel (Class & Package Interface)]
+ [2022/10/20 v1.5e LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -2182,13 +2182,15 @@
% \end{macrocode}
% \changes{v1.5b}{2022/03/18}{Switch to \cs{ProcessKeyOptions}}
% \changes{v1.5c}{2022/06/20}{Pass raw options to \cs{ProcessKeyOptions}}
+% \changes{v1.5e}{2022/10/20}
+% {Define key option handler in \pkg{ltkeys}}
% In the current preferred approach, a key family name will exist for
% processing using \pkg{ltkeys}. In that case, we replace the previous
% package options with the new ones, then call the key handler.
% Otherwise, we use the more classical clash handler.
% \begin{macrocode}
{%
- \@ifundefined{opt at fam@\@currname.\@currext}
+ \@ifundefined{opt at handler@\@currname.\@currext}
{\@onefilewithoptions at clashchk{#2}}
{%
% \end{macrocode}
@@ -2197,9 +2199,7 @@
\expandafter\protected at edef\csname opt@\@currname.\@currext\endcsname
{\zap at space#2 \@empty}%
\@namedef{@raw at opt@\@currname.\@currext}{#2}%
- \expandafter\expandafter\expandafter\ProcessKeyOptions
- \expandafter\expandafter\expandafter
- [\csname opt at fam@\@currname.\@currext\endcsname]%
+ \@nameuse{opt at handler@\@currname.\@currext}%
}%
}%
{\makeatletter
diff --git a/base/ltkeys.dtx b/base/ltkeys.dtx
index f0242416..2a021446 100644
--- a/base/ltkeys.dtx
+++ b/base/ltkeys.dtx
@@ -209,6 +209,8 @@
% \begin{macro}{\@@_options_aux:n}
% \changes{v1.0b}{2022/01/15}
% {Clear option list in end-of-package hook}
+% \changes{v1.0l}{2022/10/20}
+% {Define option handler in \pkg{ltkeys}}
% \changes{v1.0i}{2022/07/05}{Support \cs{CurrentOption}}
% \begin{macro}{\@@_options_end:}
% The main function calls functions to collect up the global and local
@@ -225,7 +227,8 @@
{ \@@_options_expand_module:Nn \@@_options_aux:n {#1} }
\cs_new_protected:Npn \@@_options_aux:n #1
{
- \cs_gset_nopar:cpn { opt at fam@\@currname.\@currext } {#1}
+ \cs_gset_protected:cpn { opt at handler@\@currname.\@currext }
+ { \ProcessKeyOptions [ #1 ] }
\cs_set_protected:Npn \@@_option_end: { }
\clist_clear:N \l_@@_options_clist
\@@_options_global:n {#1}
More information about the latex3-commits
mailing list.