[latex3-commits] [git/LaTeX3-latex3-latex2e] gh373: Reorganise ltexpl to add more functions (2774491e)

PhelypeOleinik tex.phelype at gmail.com
Thu Aug 20 04:36:58 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : gh373
Link       : https://github.com/latex3/latex2e/commit/2774491e41b11247267b036504eb5b1cd8acb2ea

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

commit 2774491e41b11247267b036504eb5b1cd8acb2ea
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Wed Aug 19 23:36:58 2020 -0300

    Reorganise ltexpl to add more functions


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

2774491e41b11247267b036504eb5b1cd8acb2ea
 base/ltexpl.dtx | 42 ++++++++++++++++++++++++++++--------------
 1 file changed, 28 insertions(+), 14 deletions(-)

diff --git a/base/ltexpl.dtx b/base/ltexpl.dtx
index 7a567e37..edb94f7f 100644
--- a/base/ltexpl.dtx
+++ b/base/ltexpl.dtx
@@ -218,11 +218,6 @@
 %
 %    \subsection{Using expl3 code}
 %
-%    \begin{macrocode}
-%<latexrelease>\IncludeInRelease{2020/10/01}%
-%<latexrelease>                 {\@expl at tl@trim at spaces@apply@@nN}
-%<latexrelease>                 {l3 macro for use in include}%
-%    \end{macrocode}
 %    In order to ease the implemantation of some new features in
 %    \LaTeXe\ we may (temporarily) use some coding based on the
 %    \pkg{expl3}-code.
@@ -231,26 +226,45 @@
 %    kernel and are not meant to be used in third-party
 %    packages. These macros will always have the \verb|@expl@|
 %    prefix in their name.
+%    \begin{macrocode}
+\ExplSyntaxOn
+%    \end{macrocode}
+%
+%    In this file, each release of LaTeX adds an \cs{IncludeInRelease}
+%    block, in which the macros copied for that release were defined.
+%    In case a rollback is requested, the entire block is changed.
+%
+%    Each macro copied has a \cs{changes} entry to explain when and why
+%    it was copied, so that further to that may spot it easily.
+%
+%    Here \cs{cs\string_gset\string_eq:NN} is used, instead of the |new|
+%    variant because if different releases use that same name for
+%    different purposes, each can copy the macro without worrying about
+%    redefinitions.
+%
+%    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2020/10/01}{expl3~2020-10-01}%
+%<latexrelease>        {expl3~macros~added~for~the~2020-10-01~release}%
+%    \end{macrocode}
 %
 % \changes{v1.2a}{2020/05/02}
 %         {Define a macro based on l3 language to support inclusion of
 %         files with space in the name (gh/217)}
 %    \begin{macrocode}
-\ExplSyntaxOn
-\cs_new_eq:NN \@expl at tl@trim at spaces@apply@@nN \tl_trim_spaces_apply:nN
-\ExplSyntaxOff
+\cs_gset_eq:NN \@expl at tl@trim at spaces@apply@@nN \tl_trim_spaces_apply:nN
 %    \end{macrocode}
 %
 %    \begin{macrocode}
 %<latexrelease>\EndIncludeInRelease
-%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease>                 {\@expl at tl@trim at spaces@apply@@nN}
-%<latexrelease>                 {l3 macro for use in include}%
-%<latexrelease>
-%<latexrelease>\let\@expl at tl@trim at spaces@apply@@nN\@undefined
-%<latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{expl3~2020-10-01}%
+%<latexrelease>        {expl3~macros~added~for~the~2020-10-01~release}%
+%<latexrelease>\cs_undefine:N \@expl at tl@trim at spaces@apply@@nN
 %<latexrelease>\EndIncludeInRelease
 %</2ekernel|latexrelease>
 %    \end{macrocode}
 %
+%    \begin{macrocode}
+\ExplSyntaxOff
+%    \end{macrocode}
+%
 % \Finale





More information about the latex3-commits mailing list.