[latex3-commits] [l3svn] r6882 - Add switch to print messages with line numbers (see #298)
noreply at latex-project.org
noreply at latex-project.org
Sat Feb 11 04:42:50 CET 2017
Author: bruno
Date: 2017-02-11 04:42:49 +0100 (Sat, 11 Feb 2017)
New Revision: 6882
Modified:
trunk/l3kernel/l3msg.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:
Add switch to print messages with line numbers (see #298)
Currently that switch is internal because we have not discussed
what interface to use.
Modified: trunk/l3kernel/l3msg.dtx
===================================================================
--- trunk/l3kernel/l3msg.dtx 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/l3msg.dtx 2017-02-11 03:42:49 UTC (rev 6882)
@@ -805,6 +805,14 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\l_@@_line_context_bool}
+% Controls whether the line context is shown as part of the decoration
+% of all (non-expandable) messages.
+% \begin{macrocode}
+\bool_new:N \l_@@_line_context_bool
+% \end{macrocode}
+% \end{variable}
+%
% \subsection{Creating messages}
%
% Messages are created and used separately, so there two parts to
@@ -1126,11 +1134,31 @@
% A function for issuing messages: both the text and order could
% in principle vary.
% \begin{macrocode}
-\cs_new:Npn \msg_fatal_text:n #1 { Fatal~#1~error }
-\cs_new:Npn \msg_critical_text:n #1 { Critical~#1~error }
-\cs_new:Npn \msg_error_text:n #1 { #1~error }
-\cs_new:Npn \msg_warning_text:n #1 { #1~warning }
-\cs_new:Npn \msg_info_text:n #1 { #1~info }
+\cs_new:Npn \msg_fatal_text:n #1
+ {
+ Fatal~#1~error
+ \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ }
+\cs_new:Npn \msg_critical_text:n #1
+ {
+ Critical~#1~error
+ \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ }
+\cs_new:Npn \msg_error_text:n #1
+ {
+ #1~error
+ \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ }
+\cs_new:Npn \msg_warning_text:n #1
+ {
+ #1~warning
+ \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ }
+\cs_new:Npn \msg_info_text:n #1
+ {
+ #1~info
+ \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ }
% \end{macrocode}
% \end{macro}
%
Modified: trunk/l3kernel/testfiles/m3expl001.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2538,6 +2538,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2526,6 +2526,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl001.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2526,6 +2526,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2526,6 +2526,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2536,6 +2536,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2538,6 +2538,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2526,6 +2526,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl003.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2526,6 +2526,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2526,6 +2526,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-02-11 03:20:54 UTC (rev 6881)
+++ trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-02-11 03:42:49 UTC (rev 6882)
@@ -2536,6 +2536,7 @@
Defining \prop_show:N on line ...
Defining \prop_show:c on line ...
Defining \l__msg_internal_tl on line ...
+Defining \l__msg_line_context_bool on line ...
Defining \c__msg_text_prefix_tl on line ...
Defining \c__msg_more_text_prefix_tl on line ...
Defining \msg_if_exist_p:nn on line ...
More information about the latex3-commits
mailing list