[latex3-commits] [git/LaTeX3-latex3-latex3] seq_set_map: Move \seq_set_map(_x):NNn to stable (ecaaf16d2)

PhelypeOleinik tex.phelype at gmail.com
Thu Jul 16 15:16:59 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : seq_set_map
Link       : https://github.com/latex3/latex3/commit/ecaaf16d206aa36f2a115b5c64829b34540c0855

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

commit ecaaf16d206aa36f2a115b5c64829b34540c0855
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Thu Jul 16 10:16:59 2020 -0300

    Move \seq_set_map(_x):NNn to stable


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

ecaaf16d206aa36f2a115b5c64829b34540c0855
 l3kernel/CHANGELOG.md     |  3 ++
 l3kernel/l3candidates.dtx | 73 -----------------------------------------------
 l3kernel/l3seq.dtx        | 73 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 76 insertions(+), 73 deletions(-)

diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 0f90256d8..13363fd65 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -11,6 +11,7 @@ this project uses date-based 'snapshot' version identifiers.
 - `l3cctab` module for using category code tables
 - `\file_parse_full_name:n` and `\file_parse_full_name_apply:nN`
 - Additional `\prop_put:Nnn` variants
+- `\seq_set_map_x:NNn`
 
 ### Fixed
 - File lookup with `\input at path`
@@ -18,6 +19,8 @@ this project uses date-based 'snapshot' version identifiers.
 ### Changed
 - Implementation of `\file_parse_full_name:nNNN` now uses
   `\file_parse_full_name:n` internally
+- `\seq_set_map:NNn` no longer `x`-expands `<inline function>`
+  (`\seq_set_map_x:NNn` now does that).  Both moved to stable.
 
 ### Removed
 - Functions deprecated at end of 2019
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index 8ff62e161..d75b37281 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -426,40 +426,6 @@
 %   \end{texnote}
 % \end{function}
 %
-% \begin{function}[added = 2011-12-22, updated = 2020-07-16]
-%   {\seq_set_map:NNn, \seq_gset_map:NNn}
-%   \begin{syntax}
-%     \cs{seq_set_map:NNn} \meta{sequence_1} \meta{sequence_2} \Arg{inline function}
-%   \end{syntax}
-%   Applies \meta{inline function} to every \meta{item} stored
-%   within the \meta{sequence_2}. The \meta{inline function} should
-%   consist of code which will receive the \meta{item} as |#1|.
-%   The sequence resulting applying \meta{inline function} to each
-%   \meta{item} is assigned to \meta{sequence_1}.
-%   \begin{texnote}
-%     Contrarily to other mapping functions, \cs{seq_map_break:} cannot
-%     be used in this function, and would lead to low-level \TeX{} errors.
-%   \end{texnote}
-% \end{function}
-%
-% \begin{function}[added = 2020-07-16]
-%   {\seq_set_map_x:NNn, \seq_gset_map_x:NNn}
-%   \begin{syntax}
-%     \cs{seq_set_map_x:NNn} \meta{sequence_1} \meta{sequence_2} \Arg{inline function}
-%   \end{syntax}
-%   Applies \meta{inline function} to every \meta{item} stored
-%   within the \meta{sequence_2}. The \meta{inline function} should
-%   consist of code which will receive the \meta{item} as |#1|.
-%   The sequence resulting from \texttt{x}-expanding
-%   \meta{inline function} applied to each \meta{item}
-%   is assigned to \meta{sequence_1}. As such, the code
-%   in \meta{inline function} should be expandable.
-%   \begin{texnote}
-%     Contrarily to other mapping functions, \cs{seq_map_break:} cannot
-%     be used in this function, and would lead to low-level \TeX{} errors.
-%   \end{texnote}
-% \end{function}
-%
 % \begin{function}[added = 2018-04-06]
 %   {\seq_set_from_function:NnN, \seq_gset_from_function:NnN}
 %   \begin{syntax}
@@ -1161,45 +1127,6 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\seq_set_map_x:NNn, \seq_gset_map_x:NNn}
-% \begin{macro}{\@@_set_map_x:NNNn}
-%   Very similar to \cs{seq_set_filter:NNn}. We could actually
-%   merge the two within a single function, but it would have weird
-%   semantics.
-%    \begin{macrocode}
-\cs_new_protected:Npn \seq_set_map_x:NNn
-  { \@@_set_map_x:NNNn \tl_set:Nx }
-\cs_new_protected:Npn \seq_gset_map_x:NNn
-  { \@@_set_map_x:NNNn \tl_gset:Nx }
-\cs_new_protected:Npn \@@_set_map_x:NNNn #1#2#3#4
-  {
-    \@@_push_item_def:n { \exp_not:N \@@_item:n {#4} }
-    #1 #2 { #3 }
-    \@@_pop_item_def:
-  }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\seq_set_map:NNn, \seq_gset_map:NNn}
-% \begin{macro}{\@@_set_map:NNNn}
-%   Similar to \cs{seq_set_map_x:NNn}, but prevents expansion of the
-%   <inline function>.
-%    \begin{macrocode}
-\cs_new_protected:Npn \seq_set_map:NNn
-  { \@@_set_map:NNNn \tl_set:Nx }
-\cs_new_protected:Npn \seq_gset_map:NNn
-  { \@@_set_map:NNNn \tl_gset:Nx }
-\cs_new_protected:Npn \@@_set_map:NNNn #1#2#3#4
-  {
-    \@@_push_item_def:n { \exp_not:n { \@@_item:n {#4} } }
-    #1 #2 { #3 }
-    \@@_pop_item_def:
-  }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
 % \begin{macro}{\seq_set_from_inline_x:Nnn, \seq_gset_from_inline_x:Nnn}
 % \begin{macro}{\@@_set_from_inline_x:NNnn}
 %   Set \cs{@@_item:n} then map it using the loop code.
diff --git a/l3kernel/l3seq.dtx b/l3kernel/l3seq.dtx
index 54ebe8b20..20d0b5fc7 100644
--- a/l3kernel/l3seq.dtx
+++ b/l3kernel/l3seq.dtx
@@ -653,6 +653,40 @@
 %   \end{texnote}
 % \end{function}
 %
+% \begin{function}[added = 2011-12-22, updated = 2020-07-16]
+%   {\seq_set_map:NNn, \seq_gset_map:NNn}
+%   \begin{syntax}
+%     \cs{seq_set_map:NNn} \meta{sequence_1} \meta{sequence_2} \Arg{inline function}
+%   \end{syntax}
+%   Applies \meta{inline function} to every \meta{item} stored
+%   within the \meta{sequence_2}. The \meta{inline function} should
+%   consist of code which will receive the \meta{item} as |#1|.
+%   The sequence resulting applying \meta{inline function} to each
+%   \meta{item} is assigned to \meta{sequence_1}.
+%   \begin{texnote}
+%     Contrarily to other mapping functions, \cs{seq_map_break:} cannot
+%     be used in this function, and would lead to low-level \TeX{} errors.
+%   \end{texnote}
+% \end{function}
+%
+% \begin{function}[added = 2020-07-16]
+%   {\seq_set_map_x:NNn, \seq_gset_map_x:NNn}
+%   \begin{syntax}
+%     \cs{seq_set_map_x:NNn} \meta{sequence_1} \meta{sequence_2} \Arg{inline function}
+%   \end{syntax}
+%   Applies \meta{inline function} to every \meta{item} stored
+%   within the \meta{sequence_2}. The \meta{inline function} should
+%   consist of code which will receive the \meta{item} as |#1|.
+%   The sequence resulting from \texttt{x}-expanding
+%   \meta{inline function} applied to each \meta{item}
+%   is assigned to \meta{sequence_1}. As such, the code
+%   in \meta{inline function} should be expandable.
+%   \begin{texnote}
+%     Contrarily to other mapping functions, \cs{seq_map_break:} cannot
+%     be used in this function, and would lead to low-level \TeX{} errors.
+%   \end{texnote}
+% \end{function}
+%
 % \begin{function}[EXP, added = 2012-07-13]{\seq_count:N, \seq_count:c}
 %   \begin{syntax}
 %     \cs{seq_count:N} \meta{sequence}
@@ -2082,6 +2116,45 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\seq_set_map_x:NNn, \seq_gset_map_x:NNn}
+% \begin{macro}{\@@_set_map_x:NNNn}
+%   Very similar to \cs{seq_set_filter:NNn}. We could actually
+%   merge the two within a single function, but it would have weird
+%   semantics.
+%    \begin{macrocode}
+\cs_new_protected:Npn \seq_set_map_x:NNn
+  { \@@_set_map_x:NNNn \tl_set:Nx }
+\cs_new_protected:Npn \seq_gset_map_x:NNn
+  { \@@_set_map_x:NNNn \tl_gset:Nx }
+\cs_new_protected:Npn \@@_set_map_x:NNNn #1#2#3#4
+  {
+    \@@_push_item_def:n { \exp_not:N \@@_item:n {#4} }
+    #1 #2 { #3 }
+    \@@_pop_item_def:
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\seq_set_map:NNn, \seq_gset_map:NNn}
+% \begin{macro}{\@@_set_map:NNNn}
+%   Similar to \cs{seq_set_map_x:NNn}, but prevents expansion of the
+%   <inline function>.
+%    \begin{macrocode}
+\cs_new_protected:Npn \seq_set_map:NNn
+  { \@@_set_map:NNNn \tl_set:Nx }
+\cs_new_protected:Npn \seq_gset_map:NNn
+  { \@@_set_map:NNNn \tl_gset:Nx }
+\cs_new_protected:Npn \@@_set_map:NNNn #1#2#3#4
+  {
+    \@@_push_item_def:n { \exp_not:n { \@@_item:n {#4} } }
+    #1 #2 { #3 }
+    \@@_pop_item_def:
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % \begin{macro}{\seq_count:N, \seq_count:c}
 % \begin{macro}{\@@_count:w, \@@_count_end:w}
 %   Since counting the items in a sequence is quite common, we optimize





More information about the latex3-commits mailing list.