[latex3-commits] [l3svn] r7399 - Let \protect to \string in line-wrapping code (fixes #340)
noreply at latex-project.org
noreply at latex-project.org
Tue Jul 18 02:59:21 CEST 2017
Author: bruno
Date: 2017-07-18 02:59:21 +0200 (Tue, 18 Jul 2017)
New Revision: 7399
Modified:
trunk/l3kernel/expl3.dtx
trunk/l3kernel/l3file.dtx
trunk/l3kernel/testfiles/m3expl001.luatex.tlg
trunk/l3kernel/testfiles/m3expl001.ptex.tlg
trunk/l3kernel/testfiles/m3expl001.tlg
trunk/l3kernel/testfiles/m3expl001.uptex.tlg
trunk/l3kernel/testfiles/m3expl001.xetex.tlg
trunk/l3kernel/testfiles/m3expl003.luatex.tlg
trunk/l3kernel/testfiles/m3expl003.ptex.tlg
trunk/l3kernel/testfiles/m3expl003.tlg
trunk/l3kernel/testfiles/m3expl003.uptex.tlg
trunk/l3kernel/testfiles/m3expl003.xetex.tlg
Log:
Let \protect to \string in line-wrapping code (fixes #340)
That follows LaTeX2e's \typeout rather than using \protected at edef, since
iow_wrap is meant for output to a terminal or log file (otherwise, why
wrap?), where preserving \protect is useless (contrarily to writing to
a file).
Modified: trunk/l3kernel/expl3.dtx
===================================================================
--- trunk/l3kernel/expl3.dtx 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/expl3.dtx 2017-07-18 00:59:21 UTC (rev 7399)
@@ -1710,14 +1710,6 @@
\fi
% \end{macrocode}
%
-% \begin{macro}{\__iow_wrap_set:Nx}
-% Without \LaTeXe{} there is no \cs{protected at edef} so the more risky
-% direct use of \cs{tl_set:Nx} is required.
-% \begin{macrocode}
-\cs_set_eq:NN \__iow_wrap_set:Nx \tl_set:Nx
-% \end{macrocode}
-% \end{macro}
-%
% For driver loading in generic mode, there are no options: pick the most
% appropriate case! To allow this loading to take place a temporary
% definition of \cs{ProvidesExplFile} is provided
Modified: trunk/l3kernel/l3file.dtx
===================================================================
--- trunk/l3kernel/l3file.dtx 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/l3file.dtx 2017-07-18 00:59:21 UTC (rev 7399)
@@ -532,7 +532,7 @@
%
% \subsection{Wrapping lines in output}
%
-% \begin{function}[added = 2012-06-28, updated = 2015-08-05]{\iow_wrap:nnnN}
+% \begin{function}[added = 2012-06-28, updated = 2017-07-17]{\iow_wrap:nnnN}
% \begin{syntax}
% \cs{iow_wrap:nnnN} \Arg{text} \Arg{run-on text} \Arg{set up} \meta{function}
% \end{syntax}
@@ -1918,7 +1918,6 @@
% \end{macro}
%
% \begin{macro}{\iow_wrap:nnnN}
-% \begin{macro}[aux]{\@@_wrap_set:Nx}
% The main wrapping function works as follows. First give |\\|,
% \verb*|\ | and other formatting commands the correct definition for
% messages and perform the given setup~|#3|. The definition of
@@ -1942,16 +1941,14 @@
#3
% \end{macrocode}
% Then fully-expand the input: in package mode, the expansion uses
-% \LaTeXe{}'s \cs{protected} mechanism. As soon as the expansion is
-% done, reset \cs{iow_indent:n} to its error definition: it only works
-% in the first argument of \cs{iow_wrap:nnnN}.
+% \LaTeXe{}'s \tn{protect} mechanism in the same way as \tn{typeout}.
+% In generic mode this setting is useless but harmless. As soon as
+% the expansion is done, reset \cs{iow_indent:n} to its error
+% definition: it only works in the first argument of
+% \cs{iow_wrap:nnnN}.
% \begin{macrocode}
-%<*initex>
+%<package> \cs_set_eq:NN \protect \token_to_str:N
\tl_set:Nx \l_@@_wrap_tl {#1}
-%</initex>
-%<*package>
- \@@_wrap_set:Nx \l_@@_wrap_tl {#1}
-%</package>
\cs_set_eq:NN \iow_indent:n \@@_indent_error:n
% \end{macrocode}
% Afterwards, set the newline marker (two assignments to fully expand,
@@ -1975,16 +1972,7 @@
#4 { \tl_to_str:N \l_@@_wrap_tl }
}
% \end{macrocode}
-% As using the generic loader means that \cs{protected at edef} is
-% not available, it's not placed directly in the wrap function but is set
-% up as an auxiliary. In the generic loader this can then be redefined.
-% \begin{macrocode}
-%<*package>
-\cs_new_eq:NN \@@_wrap_set:Nx \protected at edef
-%</package>
-% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[aux]{\@@_wrap_do:, \@@_wrap_start:w}
% Escape spaces. Set up a few variables, in particular the initial
Modified: trunk/l3kernel/testfiles/m3expl001.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2971,7 +2971,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2959,7 +2959,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl001.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2959,7 +2959,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2959,7 +2959,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2969,7 +2969,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2971,7 +2971,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2959,7 +2959,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl003.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2959,7 +2959,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2959,7 +2959,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-07-18 00:55:18 UTC (rev 7398)
+++ trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-07-18 00:59:21 UTC (rev 7399)
@@ -2969,7 +2969,6 @@
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
-Defining \__iow_wrap_set:Nx on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_start:w on line ...
Defining \__iow_wrap_chunk:nw on line ...
More information about the latex3-commits
mailing list