[latex3-commits] [git/LaTeX3-latex3-latex3] main: Fix `\iow_open:N` in ConTeXt MkII (5d074745f)

Vít Novotný witiko at gmail.com
Thu Jul 14 23:32:35 CEST 2022


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/5d074745fdc0d28c81d65c7a26af51fb24c4a89f

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

commit 5d074745fdc0d28c81d65c7a26af51fb24c4a89f
Author: Vít Novotný <witiko at gmail.com>
Date:   Thu Jul 14 23:32:35 2022 +0200

    Fix `\iow_open:N` in ConTeXt MkII


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

5d074745fdc0d28c81d65c7a26af51fb24c4a89f
 l3kernel/l3file.dtx | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index 1adf10d7f..a55a32ed3 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -1499,10 +1499,21 @@
 %
 % \begin{macro}{\@@_new:N}
 %   As for read streams, copy \tn{newwrite}, making sure
-%   that it is not \tn{outer}.
+%   that it is not \tn{outer}. For \ConTeXt{}, we have to
+%   deal with the fact that \tn{newwrite} works like our
+%   own: it actually checks before altering definition.
 %    \begin{macrocode}
 \exp_args:NNf \cs_new_protected:Npn \@@_new:N
   { \exp_args:NNc \exp_after:wN \exp_stop_f: { newwrite } }
+\cs_if_exist:NT \normalend
+  {
+    \cs_new_eq:NN \@@_new_aux:N \@@_new:N
+    \cs_set_protected:Npn \@@_new:N #1
+      {
+        \cs_undefine:N #1
+        \@@_new_aux:N #1
+      }
+  }
 %    \end{macrocode}
 % \end{macro}
 %





More information about the latex3-commits mailing list.