[latex3-commits] [latex3/latex3] tl-build-get: Rename \tl_build_get:NN and move to stable (736036203)
github at latex-project.org
github at latex-project.org
Wed Oct 25 15:24:31 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : tl-build-get
Link : https://github.com/latex3/latex3/commit/73603620361b032ab19348155974a50bcfd20d2d
>---------------------------------------------------------------
commit 73603620361b032ab19348155974a50bcfd20d2d
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Oct 25 14:13:24 2023 +0100
Rename \tl_build_get:NN and move to stable
>---------------------------------------------------------------
73603620361b032ab19348155974a50bcfd20d2d
l3experimental/l3draw/l3draw-softpath.dtx | 8 +++-----
l3kernel/CHANGELOG.md | 2 ++
l3kernel/doc/l3obsolete.txt | 1 +
l3kernel/l3candidates.dtx | 28 ----------------------------
l3kernel/l3deprecation.dtx | 7 +++++++
l3kernel/l3regex.dtx | 2 +-
l3kernel/l3tl-build.dtx | 18 ++++++++++++++++++
l3kernel/testfiles/m3tl-build001.lvt | 17 +++++++++++++++++
l3kernel/testfiles/m3tl-build001.tlg | 10 ++++++++++
9 files changed, 59 insertions(+), 34 deletions(-)
diff --git a/l3experimental/l3draw/l3draw-softpath.dtx b/l3experimental/l3draw/l3draw-softpath.dtx
index 20ba86f33..8910e7564 100644
--- a/l3experimental/l3draw/l3draw-softpath.dtx
+++ b/l3experimental/l3draw/l3draw-softpath.dtx
@@ -109,12 +109,10 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_softpath_use:
{
- \tl_build_gend:N \g_@@_softpath_main_tl
- \tl_set_eq:NN \l_@@_softpath_tmp_tl \g_@@_softpath_main_tl
+ \tl_build_get_intermediate:NN
+ \g_@@_softpath_main_tl
+ \l_@@_softpath_tmp_tl
\l_@@_softpath_tmp_tl
- \tl_build_gbegin:N \g_@@_softpath_main_tl
- \exp_args:NNV \tl_build_gput_right:Nn
- \g_@@_softpath_main_tl \l_@@_softpath_tmp_tl
}
\cs_new_protected:Npn \@@_softpath_clear:
{
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index de7c82eb6..bfda6b47e 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -10,6 +10,7 @@ this project uses date-based 'snapshot' version identifiers.
### Added
- `\text_titlecase_all:n(n)`
- `\token_to_catcode:N`
+- `\tl_build_get_intermediate:NN`
### Changed
- Refine action of `\text_titlecase_first:n(n)` to be focussed strictly on
@@ -20,6 +21,7 @@ this project uses date-based 'snapshot' version identifiers.
### Deprecated
- `\text_titlecase:n(n)` as ambiguous: replaced by `\text_titlecase_all:n(n)`
- `\tl_build_(g)clear:N` in favour of `\tl_build_(g)begin:N`
+- `\tl_build_get:NN` in favor of `\tl_build_get_intermediate:NN`
### Fixed
- Support arbitrary BCP-47 locales for case-changing overrides (issue \#1239)
diff --git a/l3kernel/doc/l3obsolete.txt b/l3kernel/doc/l3obsolete.txt
index a5d93edc6..37ecc8b6c 100644
--- a/l3kernel/doc/l3obsolete.txt
+++ b/l3kernel/doc/l3obsolete.txt
@@ -60,6 +60,7 @@ Function Date deprecated
\text_titlecase:nn 2023-07-08
\tl_build_clear:N 2023-10-18
\tl_build_gclear:N 2023-10-18
+\tl_build_get:NN 2023-10-25
\tl_case:cn 2023-05-23
\tl_case:cnF 2023-05-23
\tl_case:cnT 2023-05-23
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index 6668a18c9..2a45086ff 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -101,19 +101,6 @@
% \end{texnote}
% \end{function}
%
-% \section{Additions to \pkg{l3tl}}
-%
-% \begin{function}[added = 2018-04-01]{\tl_build_get:NN}
-% \begin{syntax}
-% \cs{tl_build_get:NN} \meta{tl~var_1} \meta{tl~var_2}
-% \end{syntax}
-% Stores the contents of the \meta{tl~var_1} in the \meta{tl~var_2}.
-% The \meta{tl~var_1} must have been set up with \cs{tl_build_begin:N}
-% or \cs{tl_build_gbegin:N}. The \meta{tl~var_2} is a
-% \enquote{normal} token list variable, assigned locally using
-% \cs{tl_set:Nn}.
-% \end{function}
-%
% \end{documentation}
%
% \begin{implementation}
@@ -154,21 +141,6 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Additions to \pkg{l3tl}}
-%
-% \subsubsection{Building a token list}
-%
-% \begin{macrocode}
-%<@@=tl>
-% \end{macrocode}
-%
-% \begin{macro}{\tl_build_get:NN}
-% \begin{macrocode}
-\cs_new_protected:Npn \tl_build_get:NN
- { \@@_build_get:NNN \__kernel_tl_set:Ne }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/l3kernel/l3deprecation.dtx b/l3kernel/l3deprecation.dtx
index 08b7fa4c7..e2eceeca9 100644
--- a/l3kernel/l3deprecation.dtx
+++ b/l3kernel/l3deprecation.dtx
@@ -623,6 +623,13 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\tl_build_get:NN}
+% \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2023-10-25 } { \tl_build_get_intermediate:NN }
+\cs_new_protected:Npn \tl_build_get:NN { \tl_build_get_intermediate:NN }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Deprecated \pkg{l3token} functions}
%
% \begin{macro}[EXP]{\char_to_utfviii_bytes:n}
diff --git a/l3kernel/l3regex.dtx b/l3kernel/l3regex.dtx
index 77645de29..74d41d419 100644
--- a/l3kernel/l3regex.dtx
+++ b/l3kernel/l3regex.dtx
@@ -5354,7 +5354,7 @@
\int_set:Nn \l_@@_curr_pos_int
{ \l_@@_start_pos_int - 1 }
\int_set_eq:NN \l_@@_curr_char_int \l_@@_last_char_success_int
- \tl_build_get:NN \l_@@_matched_analysis_tl \l_@@_internal_a_tl
+ \tl_build_get_intermediate:NN \l_@@_matched_analysis_tl \l_@@_internal_a_tl
\exp_args:NNf \@@_match_once_init_aux:
\tl_map_inline:nn
{ \exp_after:wN \l_@@_internal_a_tl \l_@@_curr_analysis_tl }
diff --git a/l3kernel/l3tl-build.dtx b/l3kernel/l3tl-build.dtx
index b8c0e2056..8fd331aff 100644
--- a/l3kernel/l3tl-build.dtx
+++ b/l3kernel/l3tl-build.dtx
@@ -106,6 +106,17 @@
% \texttt{tl} functions.
% \end{function}
%
+% \begin{function}[added = 2023-10-25]{\tl_build_get_intermediate:NN}
+% \begin{syntax}
+% \cs{tl_build_get_intermediate:NN} \meta{tl~var_1} \meta{tl~var_2}
+% \end{syntax}
+% Stores the contents of the \meta{tl~var_1} in the \meta{tl~var_2}.
+% The \meta{tl~var_1} must have been set up with \cs{tl_build_begin:N}
+% or \cs{tl_build_gbegin:N}. The \meta{tl~var_2} is a
+% \enquote{normal} token list variable, assigned locally using
+% \cs{tl_set:Nn}.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -294,6 +305,13 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\tl_build_get_intermediate:NN}
+% \begin{macrocode}
+\cs_new_protected:Npn \tl_build_get_intermediate:NN
+ { \@@_build_get:NNN \__kernel_tl_set:Ne }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_build_get:NNN}
% \begin{macro}{\@@_build_get:w, \@@_build_get_end:w}
% The idea is to expand the \meta{tl~var} then the \meta{next~tl} and
diff --git a/l3kernel/testfiles/m3tl-build001.lvt b/l3kernel/testfiles/m3tl-build001.lvt
index 0e4e36dde..0ec8c7f23 100644
--- a/l3kernel/testfiles/m3tl-build001.lvt
+++ b/l3kernel/testfiles/m3tl-build001.lvt
@@ -58,4 +58,21 @@
\tl_build_gend:N \l_tmpa_tl
}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\TEST { Viewing~accumulation }
+ {
+ \tl_build_begin:N \l_tmpa_tl
+ \tl_build_put_right:Nn \l_tmpa_tl { # }
+ \tl_build_put_right:Nn \l_tmpa_tl { AB }
+ \tl_build_put_right:Nn \l_tmpa_tl { \par }
+ \tl_build_put_left:Ne \l_tmpa_tl { \iow_char:N \\ }
+ \tl_build_get_intermediate:NN \l_tmpa_tl \l_tmpb_tl
+ \tl_show:N \l_tmpb_tl
+ \tl_build_put_right:Nn \l_tmpa_tl { \c_space_tl }
+ \tl_build_put_right:Nn \l_tmpa_tl { ## }
+ \tl_build_put_left:Nn \l_tmpa_tl { \foo }
+ \tl_build_end:N \l_tmpa_tl
+ \tl_show:N \l_tmpa_tl
+ }
+
\END
diff --git a/l3kernel/testfiles/m3tl-build001.tlg b/l3kernel/testfiles/m3tl-build001.tlg
index 4549271c8..38d40cd4b 100644
--- a/l3kernel/testfiles/m3tl-build001.tlg
+++ b/l3kernel/testfiles/m3tl-build001.tlg
@@ -83,3 +83,13 @@ l. ... }
This is a coding error.
Global assignment to a local variable '\l_tmpa_tl'.
============================================================
+============================================================
+TEST 3: Viewing accumulation
+============================================================
+> \l_tmpb_tl=\##AB\par .
+<recently read> }
+l. ... }
+> \l_tmpa_tl=\foo \##AB\par \c_space_tl ####.
+<recently read> }
+l. ... }
+============================================================
More information about the latex3-commits
mailing list.