[latex3-commits] [git/LaTeX3-latex3-latex2e] gh367: mühsam ernährt sich das Eichhörnchen ... (99779abf)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Jan 26 13:23:24 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh367
Link       : https://github.com/latex3/latex2e/commit/99779abf272409cc431caf133865905140066f28

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

commit 99779abf272409cc431caf133865905140066f28
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Jan 26 13:23:24 2022 +0100

    mühsam ernährt sich das Eichhörnchen ...


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

99779abf272409cc431caf133865905140066f28
 base/ltplain.dtx | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/base/ltplain.dtx b/base/ltplain.dtx
index 590f7586..efdc7a3b 100644
--- a/base/ltplain.dtx
+++ b/base/ltplain.dtx
@@ -1200,8 +1200,8 @@
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2022/06/01}%
-%<latexrelease>                 {\obeylines}{Add a redirection}%
+%<latexrelease>\IncludeInRelease{2022/06/01}{\obeylines}%
+%<latexrelease>    {Add a redirection to obeylines and obeyspaces}%
 %    \end{macrocode}
 %    If the active |^^M| escapes, e.g. into a \cs{write} (which is
 %    effectively in a different context) we don't want the definition
@@ -1277,15 +1277,37 @@
 %    \begin{macrocode}
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
-%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease>                 {\obeylines}{Add a redirection}%
+%<latexrelease>\IncludeInRelease{0000/00/00}{\obeylines}%
+%<latexrelease>    {Add a redirection to obeylines and obeyspaces}%
+%<latexrelease>
+%    \end{macrocode}
+%    From 2019 onwards the commands are made robust (somewhat later in
+%    the kernel sources). So if we roll back they are robust, so when
+%    redefining them we have get rid of the robust payload
+%    first. Otherwise that is seen by the later rollback below, which
+%    then installs a fragile version of the new definition on top of
+%    the one we roll back to here, sigh. \cs{kernel at make@fragile} also
+%    changes its definition (later own) so this is done directly.
+%    \begin{macrocode}
+%<latexrelease>\expandafter\let\csname obeylines \endcsname\@undefined
+%<latexrelease>\expandafter\let\csname obeyspace \endcsname\@undefined
+%<latexrelease>
 %<latexrelease>\begingroup
 %<latexrelease>\catcode`\^^M=\active % these lines must end with %
-%<latexrelease>  \gdef\obeylines{\catcode`\^^M\active \let^^M\par%
+%<latexrelease>  \gdef\obeylines{\catcode`\^^M\active \let^^M\par %
+%    \end{macrocode}
+%    Closing brace on a separate line (see comment above).
+%    \begin{macrocode}
 %<latexrelease>                 }%
-%<latexrelease>  \global\let^^M\par % this is in case ^^M appears in a \write
+%    \end{macrocode}
+%    Another pitfall: if we do a rollback \cs{par} is no longer the
+%    primitive, so the roll back definition needs \cs{let} to what is
+%    new the primitive.
+%    \begin{macrocode}
+%<latexrelease>  \global\let^^M\RawParEnd % this is in case ^^M appears in a \write
 %<latexrelease>\endgroup
 %<latexrelease>\def\obeyspaces{\catcode`\ \active}
+%<latexrelease>  \show\obeylines %
 %<latexrelease>
 %<latexrelease>\let\obeyedline\@undefined
 %<latexrelease>\let\obeyedspace\@undefined





More information about the latex3-commits mailing list.