[latex3-commits] [latex3/latex3] main: Set \l_keys_value_tl in .initial:n (see #1013) (2acd14738)
github at latex-project.org
github at latex-project.org
Tue May 23 10:09:04 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/2acd147383c8cf3fc6bbefcc965dcaae52b938f7
>---------------------------------------------------------------
commit 2acd147383c8cf3fc6bbefcc965dcaae52b938f7
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Tue May 23 15:45:08 2023 +0800
Set \l_keys_value_tl in .initial:n (see #1013)
>---------------------------------------------------------------
2acd147383c8cf3fc6bbefcc965dcaae52b938f7
l3kernel/CHANGELOG.md | 4 ++++
l3kernel/l3keys.dtx | 3 ++-
l3kernel/testfiles/m3keys001.lvt | 12 +++++++++---
l3kernel/testfiles/m3keys001.tlg | 4 +---
4 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index d41881040..1b057d4d9 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Fixed
+
+- Set `\l_keys_value_tl` in `.initial:n` (issue \#1013)
+
## [2023-05-22]
### Added
diff --git a/l3kernel/l3keys.dtx b/l3kernel/l3keys.dtx
index 84d5bc1d9..6d06102d6 100644
--- a/l3kernel/l3keys.dtx
+++ b/l3kernel/l3keys.dtx
@@ -2079,7 +2079,8 @@
\l_keys_path_str \s_@@_stop
\l_keys_key_tl \l_keys_key_str
\tl_set_eq:NN \l_keys_key_tl \l_keys_key_str
- \@@_execute:nn \l_keys_path_str {#1}
+ \tl_set:Nn \l_keys_value_tl {#1}
+ \@@_execute:no \l_keys_path_str \l_keys_value_tl
}
}
}
diff --git a/l3kernel/testfiles/m3keys001.lvt b/l3kernel/testfiles/m3keys001.lvt
index b2b83c4b4..e2333ff2d 100644
--- a/l3kernel/testfiles/m3keys001.lvt
+++ b/l3kernel/testfiles/m3keys001.lvt
@@ -98,7 +98,7 @@
}
}
-\TEST { .initial:n~and~~variants }
+\TEST { .initial:n~and~variants }
{
\keys_define:nn { module }
{
@@ -166,8 +166,14 @@
\tl_log:N \l_tmpa_tl
\keys_define:nn { module }
{
- key-one .code:n = \str_show:N \l_keys_key_str ,
- key-one .initial:n = a
+ key-one .code:n =
+ \TYPE
+ {
+ key = " \l_keys_key_str " , ~
+ path = " \l_keys_path_str " , ~
+ value = " \tl_to_str:V \l_keys_value_tl "
+ } ,
+ key-one .initial:n = a ,
}
}
diff --git a/l3kernel/testfiles/m3keys001.tlg b/l3kernel/testfiles/m3keys001.tlg
index 05bd921de..07fa0ec64 100644
--- a/l3kernel/testfiles/m3keys001.tlg
+++ b/l3kernel/testfiles/m3keys001.tlg
@@ -41,9 +41,7 @@ Defining key module/key-one on line ...
> \l_tmpa_tl=value.
> \l_tmpa_tl=xyz.
> \l_tmpa_tl=value.
-> \l_keys_key_str=key-one.
-<recently read> }
-l. ... }
+key="key-one", path="module/key-one", value="a"
============================================================
============================================================
TEST 4: .meta:n
More information about the latex3-commits
mailing list.