[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Expand ltkeys module argument (59cb8293)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Feb 15 23:30:40 CET 2022
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/59cb829347f7b14cc414af0d56b57a68eb72a345
>---------------------------------------------------------------
commit 59cb829347f7b14cc414af0d56b57a68eb72a345
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Feb 15 22:30:40 2022 +0000
Expand ltkeys module argument
>---------------------------------------------------------------
59cb829347f7b14cc414af0d56b57a68eb72a345
base/changes.txt | 5 +++++
base/ltkeys.dtx | 40 +++++++++++-----------------------------
2 files changed, 16 insertions(+), 29 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index dafd4842..ec575ae7 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -7,6 +7,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2022-02-15 Joseph Wright <Joseph.Wright at latex-project.org>
+
+ * ltkeys.dtx:
+ Expand optional module argument in design-level commands
+
2022-02-07 Joseph Wright <Joseph.Wright at latex-project.org>
* ltkeys.dtx:
diff --git a/base/ltkeys.dtx b/base/ltkeys.dtx
index 05a87c22..a15b2b45 100644
--- a/base/ltkeys.dtx
+++ b/base/ltkeys.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltkeys.dtx}
- [2022/02/07 v1.0c LaTeX Kernel (Kevyal options)]
+ [2022/02/15 v1.0d LaTeX Kernel (Kevyal options)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{ltkeys.dtx}
@@ -200,7 +200,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_options:Nn, \@@_options:NV}
+% \begin{macro}{\@@_options:Nn, \@@_options:Nf}
% \changes{v1.0b}{2022/01/15}
% {Clear option list in end-of-package hook}
% \begin{macro}{\@@_options_end:}
@@ -241,7 +241,7 @@
\@@_option_end:
\@@_options_loaded:n {#2}
}
-\cs_generate_variant:Nn \@@_options:Nn { NV }
+\cs_generate_variant:Nn \@@_options:Nn { Nf }
\msg_new:nnnn { keys } { option-unknown }
{ Unknown~option~'#1'~for~package~#2. }
{
@@ -363,13 +363,8 @@
% Defining key options is quite straight-forward: we have an intermediate
% function to allow for potential set-up steps.
% \begin{macrocode}
-\NewDocumentCommand \DeclareKeys { o +m }
- {
- \IfNoValueTF {#1}
- { \exp_args:NV \keys_define:nn \@currname }
- { \keys_define:nn {#1} }
- {#2}
- }
+\NewDocumentCommand \DeclareKeys { O { \@currname } +m }
+ { \exp_args:Nf \keys_define:nn \keys_define:nn {#1} {#2} }
% \end{macrocode}
% \end{macro}
%
@@ -379,18 +374,10 @@
% exploit that information to determine whether the package option handling
% is set up for the new approach for clash handling.
% \begin{macrocode}
-\NewDocumentCommand \ProcessKeyOptions { o }
- {
- \IfNoValueTF {#1}
- { \@@_options:NV \c_true_bool \@currname }
- { \@@_options:Nn \c_true_bool {#1} }
- }
-\NewDocumentCommand \ProcessKeyPackageOptions { o }
- {
- \IfNoValueTF {#1}
- { \@@_options:NV \c_false_bool \@currname }
- { \@@_options:Nn \c_false_bool {#1} }
- }
+\NewDocumentCommand \ProcessKeyOptions { O { \@currname } }
+ { \@@_options:Nf \c_true_bool {#1} }
+\NewDocumentCommand \ProcessKeyPackageOptions { O { \@currname } }
+ { \@@_options:Nf \c_false_bool {#1} }
\@onlypreamble \ProcessKeyOptions
\@onlypreamble \ProcessKeyPackageOptions
% \end{macrocode}
@@ -468,13 +455,8 @@
% \begin{macro}{\SetKeys}
% A simple wrapper.
% \begin{macrocode}
-\NewDocumentCommand \SetKeys { o +m }
- {
- \IfNoValueTF {#1}
- { \keys_set:Vn \@currname }
- { \keys_set:nn {#1} }
- {#2}
- }
+\NewDocumentCommand \SetKeys { O { \@currname } +m }
+ { \keys_set:nn {#1} {#2} }
% \end{macrocode}
% \end{macro}
%
More information about the latex3-commits
mailing list.