[latex3-commits] [git/LaTeX3-latex3-latex3] tl-set-eq-clist: Implement \tl_set_eq_clist:NN to change type but not data (see #786) (975364206)

Bruno Le Floch blflatex at gmail.com
Mon May 10 00:26:55 CEST 2021


Repository : https://github.com/latex3/latex3
On branch  : tl-set-eq-clist
Link       : https://github.com/latex3/latex3/commit/9753642068fd4608b95fb64c425da6e2885103c2

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

commit 9753642068fd4608b95fb64c425da6e2885103c2
Author: Bruno Le Floch <blflatex at gmail.com>
Date:   Mon May 10 00:26:55 2021 +0200

    Implement \tl_set_eq_clist:NN to change type but not data (see #786)
    
    In l3keys there are various places where one has a clist variable
    and one wants to store it in a tl.  I wouldn't mind using
    \tl_set_eq:NN (tl var) (clist var), with the thought that the
    (clist var) is in particular a tl var, but others may disagree.
    We should discuss.


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

9753642068fd4608b95fb64c425da6e2885103c2
 l3kernel/CHANGELOG.md |  3 +++
 l3kernel/l3clist.dtx  | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 447668b7b..788f62898 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+### Added
+- `\tl_set_eq_clist:NN`
+
 ## [2021-05-07]
 
 ### Added
diff --git a/l3kernel/l3clist.dtx b/l3kernel/l3clist.dtx
index 3db9365a1..e2cf48cbf 100644
--- a/l3kernel/l3clist.dtx
+++ b/l3kernel/l3clist.dtx
@@ -159,6 +159,21 @@
 %   \meta{comma list_2}.
 % \end{function}
 %
+% \begin{function}[added = 2021-05-09]
+%   {
+%     \tl_set_eq_clist:NN, \tl_set_eq_clist:cN,
+%     \tl_set_eq_clist:Nc, \tl_set_eq_clist:cc,
+%     \tl_gset_eq_clist:NN, \tl_gset_eq_clist:cN,
+%     \tl_gset_eq_clist:Nc, \tl_gset_eq_clist:cc,
+%   }
+%   \begin{syntax}
+%     \cs{tl_set_eq_clist:NN} \meta{tl~var} \meta{clist~var}
+%   \end{syntax}
+%   Sets the content of \meta{tl~var} equal to that of \meta{clist~var},
+%   including commas.  This is semantically more appropriate than
+%   \cs{clist_set_eq:NN} when the first argument is a token list.
+% \end{function}
+%
 % \begin{function}[added = 2014-07-17]
 %   {
 %     \clist_set_from_seq:NN,  \clist_set_from_seq:cN,
@@ -1021,6 +1036,26 @@
 %
 % \begin{macro}
 %   {
+%     \tl_set_eq_clist:NN, \tl_set_eq_clist:Nc,
+%     \tl_set_eq_clist:cN, \tl_set_eq_clist:cc,
+%     \tl_gset_eq_clist:NN, \tl_gset_eq_clist:Nc,
+%     \tl_gset_eq_clist:cN, \tl_gset_eq_clist:cc
+%   }
+%   Synonyms of \cs{tl_set_eq:NN}.
+%    \begin{macrocode}
+\cs_new_eq:NN \tl_set_eq_clist:NN  \tl_set_eq:NN
+\cs_new_eq:NN \tl_set_eq_clist:Nc  \tl_set_eq:Nc
+\cs_new_eq:NN \tl_set_eq_clist:cN  \tl_set_eq:cN
+\cs_new_eq:NN \tl_set_eq_clist:cc  \tl_set_eq:cc
+\cs_new_eq:NN \tl_gset_eq_clist:NN \tl_gset_eq:NN
+\cs_new_eq:NN \tl_gset_eq_clist:Nc \tl_gset_eq:Nc
+\cs_new_eq:NN \tl_gset_eq_clist:cN \tl_gset_eq:cN
+\cs_new_eq:NN \tl_gset_eq_clist:cc \tl_gset_eq:cc
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}
+%   {
 %     \clist_set_from_seq:NN, \clist_set_from_seq:cN,
 %     \clist_set_from_seq:Nc, \clist_set_from_seq:cc
 %   }





More information about the latex3-commits mailing list.