diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3msg.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3msg.dtx | 70 |
1 files changed, 54 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx index f44a405ac15..1c67bad74fa 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx @@ -24,7 +24,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3msg.dtx 6805 2016-12-28 22:15:52Z joseph $ +\GetIdInfo$Id: l3msg.dtx 6966 2017-02-20 03:39:43Z bruno $ {L3 Messages} %</driver|package> %<*driver> @@ -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 @@ -1061,7 +1069,7 @@ } \__iow_with:Nnn \tex_newlinechar:D { `\^^J } { - \__iow_with:Nnn \tex_errorcontextlines:D { - \c_one } + \__iow_with:Nnn \tex_errorcontextlines:D { -1 } { \group_begin: \cs_set_protected:Npn & @@ -1111,7 +1119,7 @@ % deliberate change by a user this is only set in format mode. % \begin{macrocode} %<*initex> -\int_gset:Nn \tex_errorcontextlines:D { - \c_one } +\int_gset:Nn \tex_errorcontextlines:D { -1 } %</initex> % \end{macrocode} % @@ -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} % @@ -1611,13 +1639,13 @@ \prop_put:cnn { l_@@_redirect_ #2 _prop } {#3} {#2} \@@_kernel_warning:nnxxxx { kernel } { message-redirect-loop } - { \seq_item:Nn \l_@@_class_loop_seq { \c_one } } - { \seq_item:Nn \l_@@_class_loop_seq { \c_two } } + { \seq_item:Nn \l_@@_class_loop_seq { 1 } } + { \seq_item:Nn \l_@@_class_loop_seq { 2 } } {#3} { \seq_map_function:NN \l_@@_class_loop_seq \@@_redirect_loop_list:n - { \seq_item:Nn \l_@@_class_loop_seq { \c_one } } + { \seq_item:Nn \l_@@_class_loop_seq { 1 } } } } { \@@_redirect_loop_chk:onn \l_@@_class_tl {#2} {#3} } @@ -1845,6 +1873,11 @@ LaTeX~has~been~asked~to~use~a~control~sequence~'#1':\\ this~has~not~been~defined~yet. } +\@@_kernel_new:nnn { kernel } { deprecated-command } + { + The~deprecated~command~'#2'~has~been~or~will~be~removed~on~#1. + \tl_if_empty:nF {#3} { ~Use~instead~'#3'. } + } \@@_kernel_new:nnnn { kernel } { empty-search-pattern } { Empty~search~pattern. } { @@ -2177,12 +2210,17 @@ % show command is called, rather than in the group created by % \cs{iow_wrap:nnnN}. This is only important for expressions % involving the \tn{currentgrouplevel} or \tn{currentgrouptype}. -% This does not lead to double expansion because the -% \texttt{x}-expansion of |#1| |{#2}| is a string in all cases where -% \cs{@@_show_wrap:Nn} is used. +% On the other hand we want the expression to be converted to a string +% with the usual escape character, hence within the wrapping code. % \begin{macrocode} \cs_new_protected:Npn \@@_show_wrap:Nn #1#2 - { \exp_args:Nx \@@_show_wrap:n { > ~ \tl_to_str:n {#2} = #1 {#2} } } + { + \exp_args:Nx \@@_show_wrap:n + { + > ~ \exp_not:n { \tl_to_str:n {#2} } = + \exp_not:N \tl_to_str:n { #1 {#2} } + } + } % \end{macrocode} % \end{macro} % @@ -2243,7 +2281,7 @@ { \__iow_with:Nnn \tex_newlinechar:D { 10 } { - \__iow_with:Nnn \tex_errorcontextlines:D { - \c_one } + \__iow_with:Nnn \tex_errorcontextlines:D { -1 } { \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN { \exp_after:wN \l_@@_internal_tl } |