[latex3-commits] [git/LaTeX3-latex3-latex3] master: Use a variant rather than \use:x (6c3a3e3)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Oct 15 11:05:58 CEST 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/6c3a3e3164f7706dd85162f499482f592eafb0f2
>---------------------------------------------------------------
commit 6c3a3e3164f7706dd85162f499482f592eafb0f2
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Oct 15 10:05:58 2018 +0100
Use a variant rather than \use:x
Will need the variant for errors, which are a bit trickier than other messages.
>---------------------------------------------------------------
6c3a3e3164f7706dd85162f499482f592eafb0f2
l3kernel/l3file.dtx | 6 ++--
l3kernel/l3msg.dtx | 54 ++++++++++++++-----------------
l3kernel/testfiles/m3expl001.luatex.tlg | 1 +
l3kernel/testfiles/m3expl001.ptex.tlg | 1 +
l3kernel/testfiles/m3expl001.tlg | 1 +
l3kernel/testfiles/m3expl001.uptex.tlg | 1 +
l3kernel/testfiles/m3expl001.xetex.tlg | 1 +
l3kernel/testfiles/m3expl003.luatex.tlg | 1 +
l3kernel/testfiles/m3expl003.ptex.tlg | 1 +
l3kernel/testfiles/m3expl003.tlg | 1 +
l3kernel/testfiles/m3expl003.uptex.tlg | 1 +
l3kernel/testfiles/m3expl003.xetex.tlg | 1 +
12 files changed, 38 insertions(+), 32 deletions(-)
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index f623ae0..968a487 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -427,7 +427,8 @@
%
% \subsection{Wrapping lines in output}
%
-% \begin{function}[added = 2012-06-28, updated = 2017-12-04]{\iow_wrap:nnnN}
+% \begin{function}[added = 2012-06-28, updated = 2017-12-04]
+% {\iow_wrap:nnnN \iow_wrap:nxnN}
% \begin{syntax}
% \cs{iow_wrap:nnnN} \Arg{text} \Arg{run-on text} \Arg{set up} \meta{function}
% \end{syntax}
@@ -1452,7 +1453,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\iow_wrap:nnnN}
+% \begin{macro}{\iow_wrap:nnnN, \iow_wrap:nxnN}
% 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
@@ -1510,6 +1511,7 @@
\exp_args:NNf \group_end:
#4 { \tl_to_str:N \l_@@_wrap_tl }
}
+\cs_generate_variant:Nn \iow_wrap:nnnN { nx }
% \end{macrocode}
% \end{macro}
%
diff --git a/l3kernel/l3msg.dtx b/l3kernel/l3msg.dtx
index b10b2d2..de8fd9e 100644
--- a/l3kernel/l3msg.dtx
+++ b/l3kernel/l3msg.dtx
@@ -1141,24 +1141,21 @@
\str_set:Nx \l_@@_text_str { \msg_warning_text:n {#1} }
\str_set:Nx \l_@@_name_str { \msg_module_name:n {#1} }
\iow_term:n { }
- \use:x
+ \iow_wrap:nxnN
{
- \iow_wrap:nnnN
- {
- \l_@@_text_str : ~
- \exp_not:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
- }
+ \l_@@_text_str : ~
+ \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
+ }
+ {
+ ( \l_@@_name_str )
+ \prg_replicate:nn
{
- ( \l_@@_name_str )
- \prg_replicate:nn
- {
- \str_count:N \l_@@_text_str
- - \str_count:N \l_@@_name_str
- }
- { ~ }
+ \str_count:N \l_@@_text_str
+ - \str_count:N \l_@@_name_str
}
- { } \iow_term:n
+ { ~ }
}
+ { } \iow_term:n
\iow_term:n { }
}
% \end{macrocode}
@@ -1183,24 +1180,21 @@
\str_set:Nx \l_@@_text_str { \msg_info_text:n {#1} }
\str_set:Nx \l_@@_name_str { \msg_module_name:n {#1} }
\iow_log:n { }
- \use:x
+ \iow_wrap:nxnN
{
- \iow_wrap:nnnN
- {
- \l_@@_text_str : ~
- \exp_not:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
- }
- {
- ( \l_@@_name_str )
- \prg_replicate:nn
- {
- \str_count:N \l_@@_text_str
- - \str_count:N \l_@@_name_str
- }
- { ~ }
- }
- { } \iow_log:n
+ \l_@@_text_str : ~
+ \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
}
+ {
+ ( \l_@@_name_str )
+ \prg_replicate:nn
+ {
+ \str_count:N \l_@@_text_str
+ - \str_count:N \l_@@_name_str
+ }
+ { ~ }
+ }
+ { } \iow_log:n
\iow_log:n { }
}
% \end{macrocode}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 2d0e40b..447e6f8 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -2822,6 +2822,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 58f1137..13e42f2 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -3115,6 +3115,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 7a3d5b8..806fb4e 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -3115,6 +3115,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 96c3343..a93e66b 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -3115,6 +3115,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index d0aa95d..b91181e 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -2860,6 +2860,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 2d0e40b..447e6f8 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -2822,6 +2822,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index 58f1137..13e42f2 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -3115,6 +3115,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 7a3d5b8..806fb4e 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -3115,6 +3115,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 96c3343..a93e66b 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -3115,6 +3115,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index d0aa95d..b91181e 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -2860,6 +2860,7 @@ Defining \iow_indent:n on line ...
Defining \__iow_indent:n on line ...
Defining \__iow_indent_error:n on line ...
Defining \iow_wrap:nnnN on line ...
+Defining \iow_wrap:nxnN on line ...
Defining \__iow_wrap_do: on line ...
Defining \__iow_wrap_fix_newline:w on line ...
Defining \__iow_wrap_start:w on line ...
More information about the latex3-commits
mailing list