[latex3-commits] [latex3/latex3] seq-filter: Move \seq_set_filter:NNn to stable (525a397c3)
github at latex-project.org
github at latex-project.org
Wed Jan 10 08:32:18 CET 2024
Repository : https://github.com/latex3/latex3
On branch : seq-filter
Link : https://github.com/latex3/latex3/commit/525a397c36b23adf06192b605477b058366b4cdc
>---------------------------------------------------------------
commit 525a397c36b23adf06192b605477b058366b4cdc
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Jan 10 07:30:49 2024 +0000
Move \seq_set_filter:NNn to stable
>---------------------------------------------------------------
525a397c36b23adf06192b605477b058366b4cdc
l3kernel/CHANGELOG.md | 1 +
l3kernel/l3candidates.dtx | 47 -----------------------------------------------
l3kernel/l3seq.dtx | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 41 insertions(+), 47 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 3d18237ca..30d1e68da 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -9,6 +9,7 @@ this project uses date-based 'snapshot' version identifiers.
### Changed
- Set `l3doc` option `kernel` off as-standard (issue \#1403)
+- Moved `\seq_set_filter:NNn` to stable
## [2024-01-04]
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index 01e766f37..21d9f8d63 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -84,23 +84,6 @@
% into the kernel. However, real use sometimes leads to better ideas, so functions from this module are
% \textbf{not necessarily stable} and we may have to adjust them!
%
-% \section{Additions to \pkg{l3seq}}
-%
-% \begin{function}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
-% \begin{syntax}
-% \cs{seq_set_filter:NNn} \meta{sequence_1} \meta{sequence_2} \Arg{inline boolexpr}
-% \end{syntax}
-% Evaluates the \meta{inline boolexpr} for every \meta{item} stored
-% within the \meta{sequence_2}. The \meta{inline boolexpr}
-% receives the \meta{item} as |#1|. The sequence of all \meta{items}
-% for which the \meta{inline boolexpr} evaluated to \texttt{true}
-% 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}
-%
% \end{documentation}
%
% \begin{implementation}
@@ -111,36 +94,6 @@
%<*package>
% \end{macrocode}
%
-% \subsection{Additions to \pkg{l3seq}}
-%
-% \begin{macrocode}
-%<@@=seq>
-% \end{macrocode}
-%
-% \begin{macro}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
-% \begin{macro}{\@@_set_filter:NNNn}
-% Similar to \cs{seq_map_inline:Nn}, without a
-% \cs{prg_break_point:} because the user's code
-% is performed within the evaluation of a boolean expression,
-% and skipping out of that would break horribly.
-% The \cs{@@_wrap_item:n} function inserts the relevant
-% \cs{@@_item:n} without expansion in the input stream,
-% hence in the \texttt{e}-expanding assignment.
-% \begin{macrocode}
-\cs_new_protected:Npn \seq_set_filter:NNn
- { \@@_set_filter:NNNn \__kernel_tl_set:Nx }
-\cs_new_protected:Npn \seq_gset_filter:NNn
- { \@@_set_filter:NNNn \__kernel_tl_gset:Ne }
-\cs_new_protected:Npn \@@_set_filter:NNNn #1#2#3#4
- {
- \@@_push_item_def:n { \bool_if:nT {#4} { \@@_wrap_item:n {##1} } }
- #1 #2 { #3 }
- \@@_pop_item_def:
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/l3kernel/l3seq.dtx b/l3kernel/l3seq.dtx
index fb2e0044a..e0393e73f 100644
--- a/l3kernel/l3seq.dtx
+++ b/l3kernel/l3seq.dtx
@@ -173,6 +173,22 @@
% See also \cs{seq_set_split:Nnn}, which removes spaces around the delimiters.
% \end{function}
%
+% \begin{function}[added = 2012-06-15]
+% {\seq_set_filter:NNn, \seq_gset_filter:NNn}
+% \begin{syntax}
+% \cs{seq_set_filter:NNn} \meta{sequence_1} \meta{sequence_2} \Arg{inline boolexpr}
+% \end{syntax}
+% Evaluates the \meta{inline boolexpr} for every \meta{item} stored
+% within the \meta{sequence_2}. The \meta{inline boolexpr}
+% receives the \meta{item} as |#1|. The sequence of all \meta{items}
+% for which the \meta{inline boolexpr} evaluated to \texttt{true}
+% 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}
% {\seq_concat:NNN, \seq_concat:ccc, \seq_gconcat:NNN, \seq_gconcat:ccc}
% \begin{syntax}
@@ -1372,6 +1388,30 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\seq_set_filter:NNn, \seq_gset_filter:NNn}
+% \begin{macro}{\@@_set_filter:NNNn}
+% Similar to \cs{seq_map_inline:Nn}, without a
+% \cs{prg_break_point:} because the user's code
+% is performed within the evaluation of a boolean expression,
+% and skipping out of that would break horribly.
+% The \cs{@@_wrap_item:n} function inserts the relevant
+% \cs{@@_item:n} without expansion in the input stream,
+% hence in the \texttt{e}-expanding assignment.
+% \begin{macrocode}
+\cs_new_protected:Npn \seq_set_filter:NNn
+ { \@@_set_filter:NNNn \__kernel_tl_set:Nx }
+\cs_new_protected:Npn \seq_gset_filter:NNn
+ { \@@_set_filter:NNNn \__kernel_tl_gset:Ne }
+\cs_new_protected:Npn \@@_set_filter:NNNn #1#2#3#4
+ {
+ \@@_push_item_def:n { \bool_if:nT {#4} { \@@_wrap_item:n {##1} } }
+ #1 #2 { #3 }
+ \@@_pop_item_def:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\seq_concat:NNN, \seq_concat:ccc}
% \UnitTested
% \begin{macro}{\seq_gconcat:NNN, \seq_gconcat:ccc}
More information about the latex3-commits
mailing list.