[latex3-commits] [latex3/latex3] main: Rename \prop_(g)put_if_new:Nn to \prop_(g)put_if_not_in:Nn (a4f845012)
github at latex-project.org
github at latex-project.org
Sun Mar 31 15:13:24 CEST 2024
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/a4f845012c6e18812d44cbc89b36660994d6566e
>---------------------------------------------------------------
commit a4f845012c6e18812d44cbc89b36660994d6566e
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Sat Mar 30 06:07:32 2024 +0800
Rename \prop_(g)put_if_new:Nn to \prop_(g)put_if_not_in:Nn
See #1511.
>---------------------------------------------------------------
a4f845012c6e18812d44cbc89b36660994d6566e
l3kernel/CHANGELOG.md | 7 +++++++
l3kernel/doc/l3obsolete.txt | 12 ++++++++++++
l3kernel/l3debug.dtx | 4 ++--
l3kernel/l3deprecation.dtx | 21 +++++++++++++++++++++
l3kernel/l3prop.dtx | 34 +++++++++++++++++-----------------
l3kernel/testfiles/m3prop002.lvt | 12 ++++++------
l3kernel/testfiles/m3prop002.tlg | 2 +-
l3kernel/testfiles/m3prop007.lvt | 12 ++++++------
l3kernel/testfiles/m3prop007.tlg | 2 +-
9 files changed, 73 insertions(+), 33 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index f1c2f822b..8002b8d2a 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Added
+- `\prop_(g)put_if_not_in:Nnn` (renamed from `\prop_(g)put_if_new:Nnn`)
+
### Changed
- Expand object names in `\pdf_object_...` functions (issue \#1521)
- Adapt `l3doc` for `ltcmd` change to handling of newlines
@@ -18,6 +21,9 @@ this project uses date-based 'snapshot' version identifiers.
(issue \#1515)
- Naming of register functions in LuaMetaTeX 2.11+ (issue \#1518)
+### Deprecated
+- `\prop_(g)put_if_new:Nnn` (renamed to `\prop_(g)put_if_not_in:Nnn`)
+
## [2024-03-14]
### Added
@@ -31,6 +37,7 @@ this project uses date-based 'snapshot' version identifiers.
### Fixed
- Typeset `TF` of internal conditionals in current color (issue \#730)
- Some functions and variables were defined locally
+
## [2024-02-20]
### Changed
diff --git a/l3kernel/doc/l3obsolete.txt b/l3kernel/doc/l3obsolete.txt
index b747afb4f..0403ec522 100644
--- a/l3kernel/doc/l3obsolete.txt
+++ b/l3kernel/doc/l3obsolete.txt
@@ -64,6 +64,18 @@ Function Date deprecated
\pdf_object_new:nn 2022-08-23
\pdf_object_write:nn 2022-08-23
\pdf_object_write:nx 2022-08-23
+\prop_gput_if_new:cnn 2024-03-30
+\prop_gput_if_new:cnV 2024-03-30
+\prop_gput_if_new:cVn 2024-03-30
+\prop_gput_if_new:Nnn 2024-03-30
+\prop_gput_if_new:NnV 2024-03-30
+\prop_gput_if_new:NVn 2024-03-30
+\prop_put_if_new:cnn 2024-03-30
+\prop_put_if_new:cnV 2024-03-30
+\prop_put_if_new:cVn 2024-03-30
+\prop_put_if_new:Nnn 2024-03-30
+\prop_put_if_new:NnV 2024-03-30
+\prop_put_if_new:NVn 2024-03-30
\str_declare_eight_bit_encoding:nnn 2020-08-20
\str_fold_case:n 2020-01-03
\str_fold_case:V 2020-01-03
diff --git a/l3kernel/l3debug.dtx b/l3kernel/l3debug.dtx
index 522d42bab..c95c9a3ac 100644
--- a/l3kernel/l3debug.dtx
+++ b/l3kernel/l3debug.dtx
@@ -780,7 +780,7 @@
\prop_pop:NnNF
\prop_pop:NnNTF
\prop_put:Nnn
- \prop_put_if_new:Nnn
+ \prop_put_if_not_in:Nnn
\prop_put_from_keyval:Nn
\prop_remove:Nn
\prop_set_eq:NN
@@ -861,7 +861,7 @@
\prop_gpop:NnNF
\prop_gpop:NnNTF
\prop_gput:Nnn
- \prop_gput_if_new:Nnn
+ \prop_gput_if_not_in:Nnn
\prop_gput_from_keyval:Nn
\prop_gremove:Nn
\prop_gset_eq:NN
diff --git a/l3kernel/l3deprecation.dtx b/l3kernel/l3deprecation.dtx
index 281a2f813..c0c41618d 100644
--- a/l3kernel/l3deprecation.dtx
+++ b/l3kernel/l3deprecation.dtx
@@ -661,6 +661,27 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Deprecated \pkg{l3prop} functions}
+%
+% \begin{macro}[deprecated]
+% {
+% \prop_put_if_new:Nnn, \prop_put_if_new:NVn, \prop_put_if_new:NnV,
+% \prop_put_if_new:cnn, \prop_put_if_new:cVn, \prop_put_if_new:cnV,
+% \prop_gput_if_new:Nnn, \prop_gput_if_new:NVn, \prop_gput_if_new:NnV,
+% \prop_gput_if_new:cnn, \prop_gput_if_new:cVn, \prop_gput_if_new:cnV
+% }
+% \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2024-03-30 } { \prop_put_if_not_in:Nnn }
+\cs_new_protected:Npn \prop_put_if_new:Nnn { \prop_put_if_not_in:Nnn }
+\__kernel_patch_deprecation:nnNNpn { 2024-03-30 } { \prop_gput_if_not_in:Nnn }
+\cs_new_protected:Npn \prop_gput_if_new:Nnn { \prop_gput_if_not_in:Nnn }
+\cs_generate_variant:Nn \prop_put_if_new:Nnn
+ { NnV , NV , c , cnV , cV }
+\cs_generate_variant:Nn \prop_gput_if_new:Nnn
+ { NnV , NV , c , cnV , cV }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/l3kernel/l3prop.dtx b/l3kernel/l3prop.dtx
index b34c9cf7f..3d228a388 100644
--- a/l3kernel/l3prop.dtx
+++ b/l3kernel/l3prop.dtx
@@ -299,15 +299,15 @@
% codes are ignored.
% \end{function}
%
-% \begin{function}
+% \begin{function}[added = 2024-03-30]
% {
-% \prop_put_if_new:Nnn, \prop_put_if_new:NVn, \prop_put_if_new:NnV,
-% \prop_put_if_new:cnn, \prop_put_if_new:cVn, \prop_put_if_new:cnV,
-% \prop_gput_if_new:Nnn, \prop_gput_if_new:NVn, \prop_gput_if_new:NnV,
-% \prop_gput_if_new:cnn, \prop_gput_if_new:cVn, \prop_gput_if_new:cnV
+% \prop_put_if_not_in:Nnn, \prop_put_if_not_in:NVn, \prop_put_if_not_in:NnV,
+% \prop_put_if_not_in:cnn, \prop_put_if_not_in:cVn, \prop_put_if_not_in:cnV,
+% \prop_gput_if_not_in:Nnn, \prop_gput_if_not_in:NVn, \prop_gput_if_not_in:NnV,
+% \prop_gput_if_not_in:cnn, \prop_gput_if_not_in:cVn, \prop_gput_if_not_in:cnV
% }
% \begin{syntax}
-% \cs{prop_put_if_new:Nnn} \meta{property list} \Arg{key} \Arg{value}
+% \cs{prop_put_if_not_in:Nnn} \meta{property list} \Arg{key} \Arg{value}
% \end{syntax}
% If the \meta{key} is present in the \meta{property list} then no
% action is taken. Otherwise, a new entry is added as described for
@@ -1358,7 +1358,7 @@
% in the linked case. If |#5| is |#3| itself we have to be careful
% not to lose the data, and we even take the opportunity to skip the
% copying step completely. To keep the correct version of the
-% duplicate keys we use the code underlying \cs{prop_put_if_new:Nnn},
+% duplicate keys we use the code underlying \cs{prop_put_if_not_in:Nnn},
% which involves passing \cs{use_none:nnn} to the auxiliary instead of
% nothing.
% There is no need to check for the case where |#3| is equal to~|#4|
@@ -1940,10 +1940,10 @@
% }
% \begin{macro}[tested = m3prop002]
% {
-% \prop_put_if_new:Nnn, \prop_put_if_new:NVn, \prop_put_if_new:NnV,
-% \prop_put_if_new:cnn, \prop_put_if_new:cVn, \prop_put_if_new:cnV,
-% \prop_gput_if_new:Nnn, \prop_gput_if_new:NVn, \prop_gput_if_new:NnV,
-% \prop_gput_if_new:cnn, \prop_gput_if_new:cVn, \prop_gput_if_new:cnV
+% \prop_put_if_not_in:Nnn, \prop_put_if_not_in:NVn, \prop_put_if_not_in:NnV,
+% \prop_put_if_not_in:cnn, \prop_put_if_not_in:cVn, \prop_put_if_not_in:cnV,
+% \prop_gput_if_not_in:Nnn, \prop_gput_if_not_in:NVn, \prop_gput_if_not_in:NnV,
+% \prop_gput_if_not_in:cnn, \prop_gput_if_not_in:cVn, \prop_gput_if_not_in:cnV
% }
% \begin{macro}[tested = m3prop002]
% {
@@ -1965,17 +1965,17 @@
% auxiliary to skip this checking step and avoid getting multiple
% error messages for the same error.
% The \meta{code} (empty for |put| and \cs{use_none:nnn} for
-% |put_if_new|) is placed before the assignment in cases where the key
+% |put_if_not_in|) is placed before the assignment in cases where the key
% is already present, in order to suppress the assignment in the
-% |put_if_new| case.
+% |put_if_not_in| case.
% \begin{macrocode}
\cs_new_protected:Npn \prop_put:Nnn
{ \@@_put:nNNnn { } \cs_set_nopar:Npe }
\cs_new_protected:Npn \prop_gput:Nnn
{ \@@_put:nNNnn { } \cs_gset_nopar:Npe }
-\cs_new_protected:Npn \prop_put_if_new:Nnn
+\cs_new_protected:Npn \prop_put_if_not_in:Nnn
{ \@@_put:nNNnn \use_none:nnn \cs_set_nopar:Npe }
-\cs_new_protected:Npn \prop_gput_if_new:Nnn
+\cs_new_protected:Npn \prop_gput_if_not_in:Nnn
{ \@@_put:nNNnn \use_none:nnn \cs_gset_nopar:Npe }
\cs_generate_variant:Nn \prop_put:Nnn
{
@@ -2005,9 +2005,9 @@
}
\cs_generate_variant:Nn \prop_gput:Nnn
{ cno , co , coo , cnx , cVx , cxV , cxx }
-\cs_generate_variant:Nn \prop_put_if_new:Nnn
+\cs_generate_variant:Nn \prop_put_if_not_in:Nnn
{ NnV , NV , c , cnV , cV }
-\cs_generate_variant:Nn \prop_gput_if_new:Nnn
+\cs_generate_variant:Nn \prop_gput_if_not_in:Nnn
{ NnV , NV , c , cnV , cV }
% \end{macrocode}
% Since the true branch of \cs{@@_split:NnTFn} is used as the
diff --git a/l3kernel/testfiles/m3prop002.lvt b/l3kernel/testfiles/m3prop002.lvt
index 25a46fe37..f5dcd7c17 100644
--- a/l3kernel/testfiles/m3prop002.lvt
+++ b/l3kernel/testfiles/m3prop002.lvt
@@ -48,24 +48,24 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\TEST { put_if_new }
+\TEST { put_if_not_in }
{
\prop_gclear:N \g_b_prop
- \prop_gput_if_new:Nnn \g_b_prop { test } { test~a \par }
+ \prop_gput_if_not_in:Nnn \g_b_prop { test } { test~a \par }
\prop_log:N \g_b_prop
\prop_gput:Nnn \g_b_prop { test } { test~b \par }
\prop_log:N \g_b_prop
- \prop_gput_if_new:Nnn \g_b_prop { test } { test~c \par }
+ \prop_gput_if_not_in:Nnn \g_b_prop { test } { test~c \par }
\prop_log:N \g_b_prop
\prop_clear:N \l_a_prop
- \prop_put_if_new:Nnn \l_a_prop { test } { test~a \par }
+ \prop_put_if_not_in:Nnn \l_a_prop { test } { test~a \par }
\prop_log:N \l_a_prop
{
\prop_put:Nnn \l_a_prop { test } { test~b \par }
\prop_log:N \l_a_prop
- \prop_put_if_new:Nnn \l_a_prop { test } { test~c \par }
+ \prop_put_if_not_in:Nnn \l_a_prop { test } { test~c \par }
\prop_log:N \l_a_prop
- \prop_put_if_new:Nnn \l_a_prop { test~d } { test~d \par }
+ \prop_put_if_not_in:Nnn \l_a_prop { test~d } { test~d \par }
\prop_log:N \l_a_prop
}
\prop_log:N \l_a_prop
diff --git a/l3kernel/testfiles/m3prop002.tlg b/l3kernel/testfiles/m3prop002.tlg
index 219586c93..65977c16d 100644
--- a/l3kernel/testfiles/m3prop002.tlg
+++ b/l3kernel/testfiles/m3prop002.tlg
@@ -28,7 +28,7 @@ The property list \g_b_prop contains the pairs (without outer braces):
> {tmp\par } => {test g}.
============================================================
============================================================
-TEST 2: put_if_new
+TEST 2: put_if_not_in
============================================================
The property list \g_b_prop contains the pairs (without outer braces):
> {test} => {test a\par }.
diff --git a/l3kernel/testfiles/m3prop007.lvt b/l3kernel/testfiles/m3prop007.lvt
index fb697cd1b..7c82f7bbc 100644
--- a/l3kernel/testfiles/m3prop007.lvt
+++ b/l3kernel/testfiles/m3prop007.lvt
@@ -119,24 +119,24 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\TEST { put_if_new }
+\TEST { put_if_not_in }
{
\prop_gclear:N \g_b_prop
- \prop_gput_if_new:Nnn \g_b_prop { test } { test~a \par }
+ \prop_gput_if_not_in:Nnn \g_b_prop { test } { test~a \par }
\prop_log:N \g_b_prop
\prop_gput:Nnn \g_b_prop { test } { test~b \par }
\prop_log:N \g_b_prop
- \prop_gput_if_new:Nnn \g_b_prop { test } { test~c \par }
+ \prop_gput_if_not_in:Nnn \g_b_prop { test } { test~c \par }
\prop_log:N \g_b_prop
\prop_clear:N \l_a_prop
- \prop_put_if_new:Nnn \l_a_prop { test } { test~a \par }
+ \prop_put_if_not_in:Nnn \l_a_prop { test } { test~a \par }
\prop_log:N \l_a_prop
{
\prop_put:Nnn \l_a_prop { test } { test~b \par }
\prop_log:N \l_a_prop
- \prop_put_if_new:Nnn \l_a_prop { test } { test~c \par }
+ \prop_put_if_not_in:Nnn \l_a_prop { test } { test~c \par }
\prop_log:N \l_a_prop
- \prop_put_if_new:Nnn \l_a_prop { test~d } { test~d \par }
+ \prop_put_if_not_in:Nnn \l_a_prop { test~d } { test~d \par }
\prop_log:N \l_a_prop
}
\prop_log:N \l_a_prop
diff --git a/l3kernel/testfiles/m3prop007.tlg b/l3kernel/testfiles/m3prop007.tlg
index 68c483a6b..1f9e0a5fc 100644
--- a/l3kernel/testfiles/m3prop007.tlg
+++ b/l3kernel/testfiles/m3prop007.tlg
@@ -96,7 +96,7 @@ The linked property list \g_b_prop contains the pairs (without outer braces):
> {tmp\par } => {test g}.
============================================================
============================================================
-TEST 6: put_if_new
+TEST 6: put_if_not_in
============================================================
The linked property list \g_b_prop contains the pairs (without outer braces):
> {test} => {test a\par }.
More information about the latex3-commits
mailing list.