[latex3-commits] [latex3/latex3] main: Standardise variants for \prop_(g)pop:NnN(TF) (see #1257) (efaf0761c)

github at latex-project.org github at latex-project.org
Fri Sep 8 19:12:31 CEST 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/efaf0761cc89ee74e1af50ba72a159fce1f19c94

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

commit efaf0761cc89ee74e1af50ba72a159fce1f19c94
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Sep 8 14:00:00 2023 +0100

    Standardise variants for \prop_(g)pop:NnN(TF)  (see #1257)
    
    The c-type variants here are only seen for gpop,
    but provided for pop also as this is consistent.
    
    Only V-type variant is seen for the 'standard set':
    the one o-type case in TL is covered but drop others.


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

efaf0761cc89ee74e1af50ba72a159fce1f19c94
 l3kernel/CHANGELOG.md |  1 +
 l3kernel/l3prop.dtx   | 58 ++++++++++++++++++++++++++++++++++++++-------------
 2 files changed, 44 insertions(+), 15 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 0967b3213..647cae8f1 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -8,6 +8,7 @@ this project uses date-based 'snapshot' version identifiers.
 ## [Unreleased]
 
 ### Changed
+- Standardise variants for `\prop_(g)pop:NnN(TF)`
 - Standardise variants for `\prop_(g)put:Nnn`
 - Standardise variants for `\prop_(g)put_if_new:Nnn`
 - Standardise variants for `\prop_(g)remove:Nn`
diff --git a/l3kernel/l3prop.dtx b/l3kernel/l3prop.dtx
index 0f92ccd29..9a79bf166 100644
--- a/l3kernel/l3prop.dtx
+++ b/l3kernel/l3prop.dtx
@@ -261,8 +261,8 @@
 %
 % \begin{function}[updated = 2011-08-28]
 %   {
-%     \prop_get:NnN, \prop_get:NVN, \prop_get:NvN, \prop_get:NoN, \prop_get:NxN,
-%     \prop_get:cnN, \prop_get:cVN, \prop_get:cvN, \prop_get:coN, \prop_get:cxN,
+%     \prop_get:NnN, \prop_get:NVN, \prop_get:NvN, \prop_get:NxN, \prop_get:NoN,
+%     \prop_get:cnN, \prop_get:cVN, \prop_get:cvN, \prop_get:cxN, \prop_get:coN,
 %     \prop_get:cnc
 %   }
 %   \begin{syntax}
@@ -278,7 +278,10 @@
 % \end{function}
 %
 % \begin{function}[updated = 2011-08-18]
-%   {\prop_pop:NnN, \prop_pop:NoN, \prop_pop:cnN, \prop_pop:coN}
+%   {
+%     \prop_pop:NnN, \prop_pop:NVN, 
+%     \prop_pop:cnN, \prop_pop:cVN,
+%   }
 %   \begin{syntax}
 %     \cs{prop_pop:NnN} \meta{property list} \Arg{key} \meta{tl var}
 %   \end{syntax}
@@ -292,7 +295,11 @@
 % \end{function}
 %
 % \begin{function}[updated = 2011-08-18]
-%   {\prop_gpop:NnN, \prop_gpop:NoN, \prop_gpop:cnN, \prop_gpop:coN}
+%   {
+%     \prop_gpop:NnN, \prop_gpop:NVN,
+%     \prop_gpop:NoN,
+%     \prop_gpop:cnN, \prop_gpop:cVN,
+%   }
 %   \begin{syntax}
 %     \cs{prop_gpop:NnN} \meta{property list} \Arg{key} \meta{tl var}
 %   \end{syntax}
@@ -436,7 +443,10 @@
 % \end{function}
 %
 % \begin{function}[TF, added = 2011-08-18, updated = 2012-05-19]
-%   {\prop_pop:NnN, \prop_pop:cnN}
+%   {
+%     \prop_pop:NnN, \prop_pop:NVN, 
+%     \prop_pop:cnN, \prop_pop:cVN,
+%   }
 %   \begin{syntax}
 %     \cs{prop_pop:NnNTF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code} \Arg{false code}
 %   \end{syntax}
@@ -452,7 +462,11 @@
 % \end{function}
 %
 % \begin{function}[TF, added = 2011-08-18, updated = 2012-05-19]
-%   {\prop_gpop:NnN, \prop_gpop:cnN}
+%   {
+%     \prop_gpop:NnN, \prop_gpop:NVN,
+%     \prop_gpop:NoN,
+%     \prop_gpop:cnN, \prop_gpop:cVN,
+%   }
 %   \begin{syntax}
 %     \cs{prop_gpop:NnNTF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code} \Arg{false code}
 %   \end{syntax}
@@ -1027,9 +1041,16 @@
 % \end{macro}
 %
 % \begin{macro}[tested = m3prop002]
-%   {\prop_pop:NnN, \prop_pop:NoN, \prop_pop:cnN, \prop_pop:coN}
+%   {
+%     \prop_pop:NnN, \prop_pop:NVN, 
+%     \prop_pop:cnN, \prop_pop:cVN,
+%   }
 % \begin{macro}[tested = m3prop002]
-%   {\prop_gpop:NnN, \prop_gpop:NoN, \prop_gpop:cnN, \prop_gpop:coN}
+%   {
+%     \prop_gpop:NnN, \prop_gpop:NVN,
+%     \prop_gpop:NoN,
+%     \prop_gpop:cnN, \prop_gpop:cVN,
+%   }
 %   Popping a value also starts by doing the split.
 %   If the key is present, save the value in the token list and update the
 %   property list as when deleting.
@@ -1053,10 +1074,11 @@
       }
       { \tl_set:Nn #3 { \q_no_value } }
   }
-\cs_generate_variant:Nn \prop_pop:NnN  {     No }
-\cs_generate_variant:Nn \prop_pop:NnN  { c , co }
-\cs_generate_variant:Nn \prop_gpop:NnN {     No }
-\cs_generate_variant:Nn \prop_gpop:NnN { c , co }
+\cs_generate_variant:Nn \prop_pop:NnN  {     NV }
+\cs_generate_variant:Nn \prop_pop:NnN  { c , cV }
+\cs_generate_variant:Nn \prop_gpop:NnN {     NV }
+\cs_generate_variant:Nn \prop_gpop:NnN { No }
+\cs_generate_variant:Nn \prop_gpop:NnN { c , cV }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -1148,7 +1170,13 @@
 % \end{macro}
 %
 % \begin{macro}[TF, tested = m3prop004]
-%   {\prop_pop:NnN, \prop_pop:cnN, \prop_gpop:NnN, \prop_gpop:cnN}
+%   {
+%     \prop_pop:NnN,  \prop_pop:NVN, 
+%     \prop_pop:cnN,  \prop_pop:cVN,
+%     \prop_gpop:NnN, \prop_gpop:NVN,
+%     \prop_gpop:NoN,
+%     \prop_gpop:cnN, \prop_gpop:cVN,
+%   }
 %   Popping an item from a property list, keeping track of whether
 %   the key was present or not, is implemented as a conditional.
 %   If the key was missing, neither the property list, nor the token
@@ -1175,8 +1203,8 @@
       }
       { \prg_return_false: }
   }
-\prg_generate_conditional_variant:Nnn \prop_pop:NnN { c } { T , F , TF }
-\prg_generate_conditional_variant:Nnn \prop_gpop:NnN { c } { T , F , TF }
+\prg_generate_conditional_variant:Nnn \prop_pop:NnN  { NV , c , cV } { T , F , TF }
+\prg_generate_conditional_variant:Nnn \prop_gpop:NnN { NV , c , cV } { T , F , TF }
 %    \end{macrocode}
 % \end{macro}
 %





More information about the latex3-commits mailing list.