summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3msg.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx473
1 files changed, 294 insertions, 179 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index f4351fbf64e..f3b1419ee6b 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -41,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2018-09-24}
+% \date{Released 2018-10-17}
%
% \maketitle
%
@@ -148,7 +148,7 @@
% Produces the standard text
% \begin{quote}
% \ttfamily
-% Fatal \meta{module} error
+% Fatal Package \meta{module} Error
% \end{quote}
% This function can be redefined to alter the language in which the
% message is given, using |#1| as the name of the \meta{module} to
@@ -162,7 +162,7 @@
% Produces the standard text
% \begin{quote}
% \ttfamily
-% Critical \meta{module} error
+% Critical Package \meta{module} Error
% \end{quote}
% This function can be redefined to alter the language in which the
% message is given, using |#1| as the name of the \meta{module} to
@@ -176,7 +176,7 @@
% Produces the standard text
% \begin{quote}
% \ttfamily
-% \meta{module} error
+% Package \meta{module} Error
% \end{quote}
% This function can be redefined to alter the language in which the
% message is given, using |#1| as the name of the \meta{module} to
@@ -190,11 +190,12 @@
% Produces the standard text
% \begin{quote}
% \ttfamily
-% \meta{module} warning
+% Package \meta{module} Warning
% \end{quote}
% This function can be redefined to alter the language in which the
% message is given, using |#1| as the name of the \meta{module} to
-% be included.
+% be included. The \meta{type} of \meta{module} may be adjusted:
+% |Package| is the standard outcome: see \cs{msg_module_type:n}.
% \end{function}
%
% \begin{function}[EXP]{\msg_info_text:n}
@@ -204,14 +205,34 @@
% Produces the standard text:
% \begin{quote}
% \ttfamily
-% \meta{module} info
+% Package \meta{module} Info
% \end{quote}
% This function can be redefined to alter the language in which the
% message is given, using |#1| as the name of the \meta{module} to
-% be included.
+% be included. The \meta{type} of \meta{module} may be adjusted:
+% |Package| is the standard outcome: see \cs{msg_module_type:n}.
% \end{function}
%
-% \begin{function}[EXP]{\msg_see_documentation_text:n}
+% \begin{function}[EXP, added = 2019-10-10]{\msg_module_name:n}
+% \begin{syntax}
+% \cs{msg_module_name:n} \Arg{module}
+% \end{syntax}
+% Expands to the public name of the \meta{module} as defined by
+% \cs{g_msg_module_name_prop} (or otherwise leaves the \meta{module}
+% unchanged).
+% \end{function}
+%
+% \begin{function}[EXP, added = 2019-10-10]{\msg_module_type:n}
+% \begin{syntax}
+% \cs{msg_module_type:n} \Arg{module}
+% \end{syntax}
+% Expands to the description which applies to the \meta{module},
+% for example a |Package| or |Class|. The information here is defined
+% in \cs{g_msg_module_type_prop}, and will default to |Package| if an
+% entry is not present.
+% \end{function}
+%
+% \begin{function}[EXP,updated = 2018-09-30]{\msg_see_documentation_text:n}
% \begin{syntax}
% \cs{msg_see_documentation_text:n} \Arg{module}
% \end{syntax}
@@ -223,9 +244,23 @@
% \end{quote}
% This function can be redefined to alter the language in which the
% message is given, using |#1| as the name of the \meta{module} to
-% be included.
+% be included. The name of the \meta{module} may be altered by use of
+% \cs{g_msg_module_documentation_prop}
% \end{function}
%
+% \begin{variable}[added = 2018-10-10]{\g_msg_module_name_prop}
+% Provides a mapping between the module name used for messages, and that
+% for documentation. For example, \LaTeX{}3 core messages are stored in
+% the reserved |LaTeX| tree, but are printed as |LaTeX3|.
+% \end{variable}
+%
+% \begin{variable}[added = 2018-10-10]{\g_msg_module_type_prop}
+% Provides a mapping between the module name used for messages, and that
+% type of module. For example, for \LaTeX{}3 core messages, an empty entry
+% is set here meaning that they are not described using the standard
+% |Package| text.
+% \end{variable}
+%
% \section{Issuing messages}
%
% Messages behave differently depending on the message class. In all cases,
@@ -458,72 +493,6 @@
% \end{verbatim}
% \end{function}
%
-% \section{Low-level message functions}
-%
-% The lower-level message functions should usually be accessed from the
-% higher-level system. However, there are occasions where direct
-% access to these functions is desirable.
-%
-% \begin{function}[added = 2012-06-28]{\msg_interrupt:nnn}
-% \begin{syntax}
-% \cs{msg_interrupt:nnn} \Arg{first line} \Arg{text} \Arg{extra text}
-% \end{syntax}
-% Interrupts the \TeX{} run, issuing a formatted message comprising
-% \meta{first line} and \meta{text} laid out in the format
-% \begin{verbatim}
-% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-% !
-% ! <first line>
-% !
-% ! <text>
-% !...............................................
-% \end{verbatim}
-% where the \meta{text} is wrapped to fit within the current
-% line length. The user may then request more information, at which
-% stage the \meta{extra text} is shown in the terminal in the
-% format
-% \begin{verbatim}
-% |'''''''''''''''''''''''''''''''''''''''''''''''
-% | <extra text>
-% |...............................................
-% \end{verbatim}
-% where the \meta{extra text} is wrapped within the current
-% line length. Wrapping of both \meta{text} and \meta{more text} takes place
-% using \cs{iow_wrap:nnnN}; the documentation for the latter should be
-% consulted for full details.
-% \end{function}
-%
-% \begin{function}[added = 2012-06-28]{\msg_log:n}
-% \begin{syntax}
-% \cs{msg_log:n} \Arg{text}
-% \end{syntax}
-% Writes to the log file with the \meta{text} laid out in the format
-% \begin{verbatim}
-% .................................................
-% . <text>
-% .................................................
-% \end{verbatim}
-% where the \meta{text} is wrapped to fit within the current
-% line length. Wrapping takes place using \cs{iow_wrap:nnnN}; the
-% documentation for the latter should be consulted for full details.
-% \end{function}
-%
-% \begin{function}[added = 2012-06-28]{\msg_term:n}
-% \begin{syntax}
-% \cs{msg_term:n} \Arg{text}
-% \end{syntax}
-% Writes to the terminal and log file with the \meta{text} laid out in the
-% format
-% \begin{verbatim}
-% *************************************************
-% * <text>
-% *************************************************
-% \end{verbatim}
-% where the \meta{text} is wrapped to fit within the current
-% line length. Wrapping takes place using \cs{iow_wrap:nnnN}; the
-% documentation for the latter should be consulted for full details.
-% \end{function}
-%
% \end{documentation}
%
% \begin{implementation}
@@ -538,18 +507,18 @@
%<@@=msg>
% \end{macrocode}
%
-% \begin{variable}{\l_@@_internal_tl}
+% \begin{variable}{\l_@@_tmp_tl}
% A general scratch for the module.
% \begin{macrocode}
-\tl_new:N \l_@@_internal_tl
+\tl_new:N \l_@@_tmp_tl
% \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{variable}{\l_@@_name_str, \l_@@_text_str}
+% Used to save module info when creating messages.
% \begin{macrocode}
-\bool_new:N \l_@@_line_context_bool
+\str_new:N \l_@@_name_str
+\str_new:N \l_@@_text_str
% \end{macrocode}
% \end{variable}
%
@@ -702,7 +671,7 @@
%
% \subsection{Showing messages: low level mechanism}
%
-% \begin{macro}{\msg_interrupt:nnn}
+% \begin{macro}{\@@_interrupt:Nnnn}
% The low-level interruption macro is rather opaque, unfortunately.
% Depending on the availability of more information there is a choice
% of how to set up the further help. We feed the extra help text and
@@ -710,49 +679,70 @@
% must first setup \TeX{}'s \tn{errhelp} register before issuing an
% \tn{errmessage}.
% \begin{macrocode}
-\cs_new_protected:Npn \msg_interrupt:nnn #1#2#3
+\cs_new_protected:Npn \@@_interrupt:Nnnn #1#2#3#4
{
- \tl_if_empty:nTF {#3}
+ \str_set:Nx \l_@@_text_str { #1 {#2} }
+ \str_set:Nx \l_@@_name_str { \msg_module_name:n {#2} }
+ \tl_if_empty:nTF {#4}
{
- \@@_interrupt_wrap:nn { \\ \c_@@_no_info_text_tl }
- {#1 \\\\ #2 \\\\ \c_@@_continue_text_tl }
+ \@@_interrupt_wrap:nnn {#3}
+ { \c_@@_continue_text_tl }
+ { \c_@@_no_info_text_tl }
}
{
- \@@_interrupt_wrap:nn { \\ #3 }
- {#1 \\\\ #2 \\\\ \c_@@_help_text_tl }
+ \@@_interrupt_wrap:nnn {#3}
+ { \c_@@_help_text_tl }
+ {#4}
}
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_interrupt_wrap:nn}
-% \begin{macro}{\@@_interrupt_more_text:n}
+% \begin{macro}{\@@_interrupt_wrap:nnn}
+% \begin{macro}{\@@_interrupt_text:n, \@@_interrupt_more_text:n}
% First setup \TeX{}'s \tn{errhelp} register with the extra help |#1|,
% then build a nice-looking error message with |#2|. Everything is
% done using \texttt{x}-type expansion as the new line markers are
% different for the two type of text and need to be correctly set up.
% The auxiliary \cs{@@_interrupt_more_text:n} receives its argument
% as a line-wrapped string, which is thus unaffected by expansion.
+% We ave to split the main text into two parts as only the \enquote{message}
+% itself is wrapped with a leader: the generic help is wrapped at full
+% width. We also have to allow for the two characters used by \tn{errmessage}
+% itself.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_interrupt_wrap:nn #1#2
+\cs_new_protected:Npn \@@_interrupt_wrap:nnn #1#2#3
{
- \iow_wrap:nnnN {#1} { | ~ } { } \@@_interrupt_more_text:n
- \iow_wrap:nnnN {#2} { ! ~ } { } \@@_interrupt_text:n
+ \iow_wrap:nnnN { \\ #3 } { } { } \@@_interrupt_more_text:n
+ \group_begin:
+ \int_sub:Nn \l_iow_line_count_int { 2 }
+ \iow_wrap:nxnN { \l_@@_text_str : ~ #1 }
+ {
+ ( \l_@@_name_str )
+ \prg_replicate:nn
+ {
+ \str_count:N \l_@@_text_str
+ - \str_count:N \l_@@_name_str
+ + 2
+ }
+ { ~ }
+ }
+ { } \@@_interrupt_text:n
+ \iow_wrap:nnnN { \l_@@_tmp_tl \\ \\ #2 } { } { }
+ \@@_interrupt:n
}
-\cs_new_protected:Npn \@@_interrupt_more_text:n #1
+\cs_new_protected:Npn \@@_interrupt_text:n #1
{
- \exp_args:Nx \tex_errhelp:D
- {
- |'''''''''''''''''''''''''''''''''''''''''''''''
- #1 \iow_newline:
- |...............................................
- }
+ \group_end:
+ \tl_set:Nn \l_@@_tmp_tl {#1}
}
+\cs_new_protected:Npn \@@_interrupt_more_text:n #1
+ { \exp_args:Nx \tex_errhelp:D { #1 \iow_newline: } }
% \end{macrocode}
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_interrupt_text:n}
+% \begin{macro}{\@@_interrupt:n}
% The business end of the process starts by producing some visual
% separation of the message from the main part of the log. The error
% message needs to be printed with everything made
@@ -760,7 +750,7 @@
% which \tn{errmessage} is called, and the end of the argument of the
% \tn{errmessage}, including the closing brace. We use an active |!|
% to call the \tn{errmessage} primitive, and end its argument with
-% \cs{use_none:n} \Arg{dots} which fills the output with dots. Two
+% \cs{use_none:n} \Arg{spaces} which fills the output with spaces. Two
% trailing closing braces are turned into spaces to hide them as well.
% The group in which we alter the definition of the active |!| is
% closed before producing the message: this ensures that tokens
@@ -780,22 +770,17 @@
% inserted by the user. This is unavoidable.
% \begin{macrocode}
\group_begin:
- \char_set_lccode:nn {`\{} {`\ }
- \char_set_lccode:nn {`\}} {`\ }
- \char_set_lccode:nn {`\&} {`\!}
+ \char_set_lccode:nn { 38 } { 32 } % &
+ \char_set_lccode:nn { 46 } { 32 } % .
+ \char_set_lccode:nn { 123 } { 32 } % {
+ \char_set_lccode:nn { 125 } { 32 } % }
\char_set_catcode_active:N \&
\tex_lowercase:D
{
\group_end:
- \cs_new_protected:Npn \@@_interrupt_text:n #1
+ \cs_new_protected:Npn \@@_interrupt:n #1
{
- \iow_term:x
- {
- \iow_newline:
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- \iow_newline:
- !
- }
+ \iow_term:n { }
\__kernel_iow_with:Nnn \tex_newlinechar:D { `\^^J }
{
\__kernel_iow_with:Nnn \tex_errorcontextlines:D { -1 }
@@ -820,27 +805,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\msg_log:n}
-% \begin{macro}{\msg_term:n}
-% Printing to the log or terminal without a stop is rather easier.
-% A bit of simple visual work sets things off nicely.
-% \begin{macrocode}
-\cs_new_protected:Npn \msg_log:n #1
- {
- \iow_log:n { ................................................. }
- \iow_wrap:nnnN { . ~ #1} { . ~ } { } \iow_log:n
- \iow_log:n { ................................................. }
- }
-\cs_new_protected:Npn \msg_term:n #1
- {
- \iow_term:n { ************************************************* }
- \iow_wrap:nnnN { * ~ #1} { * ~ } { } \iow_term:n
- \iow_term:n { ************************************************* }
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \subsection{Displaying messages}
%
% \LaTeX{} is handling error messages and so the \TeX{} ones are disabled.
@@ -852,7 +816,7 @@
%</initex>
% \end{macrocode}
%
-% \begin{macro}
+% \begin{macro}[EXP]
% {
% \msg_fatal_text:n ,
% \msg_critical_text:n ,
@@ -860,46 +824,86 @@
% \msg_warning_text:n ,
% \msg_info_text:n
% }
+% \begin{macro}[EXP]{\@@_text:nn}
+% \begin{macro}[EXP]{\@@_text:n}
% A function for issuing messages: both the text and order could
-% in principle vary.
+% in principle vary. The module name may be empty for kernel messages,
+% hence the slightly contorted code path for a space.
% \begin{macrocode}
\cs_new:Npn \msg_fatal_text:n #1
{
- Fatal~#1~error
- \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ Fatal ~
+ \msg_error_text:n {#1}
}
\cs_new:Npn \msg_critical_text:n #1
{
- Critical~#1~error
- \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ Critical ~
+ \msg_error_text:n {#1}
}
\cs_new:Npn \msg_error_text:n #1
+ { \@@_text:nn {#1} { Error } }
+\cs_new:Npn \msg_warning_text:n #1
+ { \@@_text:nn {#1} { Warning } }
+\cs_new:Npn \msg_info_text:n #1
+ { \@@_text:nn {#1} { Info } }
+\cs_new:Npn \@@_text:nn #1#2
{
- #1~error
- \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ \exp_args:Nf \@@_text:n { \msg_module_type:n {#1} }
+ \msg_module_name:n {#1} ~
+ #2
}
-\cs_new:Npn \msg_warning_text:n #1
+\cs_new:Npn \@@_text:n #1
{
- #1~warning
- \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ \tl_if_blank:nF {#1}
+ { #1 ~ }
}
-\cs_new:Npn \msg_info_text:n #1
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{variable}{\g_msg_module_name_prop, \g_msg_module_type_prop}
+% For storing public module information: the kernel data is set up
+% in advance.
+% \begin{macrocode}
+\prop_new:N \g_msg_module_name_prop
+\prop_gput:Nnn \g_msg_module_name_prop { LaTeX } { LaTeX3 }
+\prop_new:N \g_msg_module_type_prop
+\prop_gput:Nnn \g_msg_module_type_prop { LaTeX } { }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}[EXP]{\msg_module_type:n}
+% Contextual footer information, with the potential to give modules an
+% alternative name.
+% \begin{macrocode}
+\cs_new:Npn \msg_module_type:n #1
{
- #1~info
- \bool_if:NT \l_@@_line_context_bool { ~ \msg_line_context: }
+ \prop_if_in:NnTF \g_msg_module_type_prop {#1}
+ { \prop_item:Nn \g_msg_module_type_prop {#1} }
+%<*initex>
+ { Module }
+%</initex>
+%<*package>
+ { Package }
+%</package>
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\msg_see_documentation_text:n}
-% Contextual footer information. The \LaTeX{} module only comprises
-% \LaTeX3 code, so we refer to the \LaTeX3 documentation rather than
-% simply \enquote{\LaTeX{}}.
+% \begin{macro}[EXP]{\msg_moudle_name:n, \msg_see_documentation_text:n}
+% Contextual footer information, with the potential to give modules an
+% alternative name.
% \begin{macrocode}
+\cs_new:Npn \msg_module_name:n #1
+ {
+ \prop_if_in:NnTF \g_msg_module_name_prop {#1}
+ { \prop_item:Nn \g_msg_module_name_prop {#1} }
+ {#1}
+ }
\cs_new:Npn \msg_see_documentation_text:n #1
{
- \\ \\ See~the~
- \str_if_eq:nnTF {#1} { LaTeX } { LaTeX3 } {#1} ~
+ See~the~ \msg_module_name:n {#1} ~
documentation~for~further~information.
}
% \end{macrocode}
@@ -965,12 +969,10 @@
% \begin{macrocode}
\@@_class_new:nn { fatal }
{
- \msg_interrupt:nnn
- { \msg_fatal_text:n {#1} : ~ "#2" }
- {
- \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
- \msg_see_documentation_text:n {#1}
- }
+ \@@_interrupt:Nnnn
+ \msg_fatal_text:n
+ {#1}
+ { \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} }
{ \c_@@_fatal_text_tl }
\tex_end:D
}
@@ -993,12 +995,10 @@
% \begin{macrocode}
\@@_class_new:nn { critical }
{
- \msg_interrupt:nnn
- { \msg_critical_text:n {#1} : ~ "#2" }
- {
- \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
- \msg_see_documentation_text:n {#1}
- }
+ \@@_interrupt:Nnnn
+ \msg_critical_text:n
+ {#1}
+ { \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} }
{ \c_@@_critical_text_tl }
\tex_endinput:D
}
@@ -1028,12 +1028,10 @@
{ \c_@@_more_text_prefix_tl #1 / #2 }
{#3} {#4} {#5} {#6}
{
- \msg_interrupt:nnn
- { \msg_error_text:n {#1} : ~ "#2" }
- {
- \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
- \msg_see_documentation_text:n {#1}
- }
+ \@@_interrupt:Nnnn
+ \msg_error_text:n
+ {#1}
+ { \use:c { \c_@@_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} }
}
}
\cs_new_protected:Npn \@@_error:cnnnnn #1#2#3#4#5#6
@@ -1063,11 +1061,25 @@
% \begin{macrocode}
\@@_class_new:nn { warning }
{
- \msg_term:n
+ \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 { }
+ \iow_wrap:nxnN
{
- \msg_warning_text:n {#1} : ~ "#2" \\ \\
+ \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_term:n
+ \iow_term:n { }
}
% \end{macrocode}
% \end{macro}
@@ -1088,11 +1100,25 @@
% \begin{macrocode}
\@@_class_new:nn { info }
{
- \msg_log:n
+ \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 { }
+ \iow_wrap:nxnN
{
- \msg_info_text:n {#1} : ~ "#2" \\ \\
+ \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}
% \end{macro}
@@ -1187,13 +1213,13 @@
{
\tl_if_empty:nF {#1}
{ \exp_args:No \iow_term:n { \use_none:n #1 } }
- \tl_set:Nn \l_@@_internal_tl {#2}
+ \tl_set:Nn \l_@@_tmp_tl {#2}
\__kernel_iow_with:Nnn \tex_newlinechar:D { 10 }
{
\__kernel_iow_with:Nnn \tex_errorcontextlines:D { -1 }
{
\tex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN
- { \exp_after:wN \l_@@_internal_tl }
+ { \exp_after:wN \l_@@_tmp_tl }
}
}
}
@@ -2044,6 +2070,95 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}[deprecated = 2019-12-31]{\msg_log:n, \msg_term:n}
+% \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \iow_log:n }
+\cs_new_protected:Npn \msg_log:n #1
+ {
+ \iow_log:n { ................................................. }
+ \iow_wrap:nnnN { . ~ #1} { . ~ } { } \iow_log:n
+ \iow_log:n { ................................................. }
+ }
+\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { \iow_term:n }
+\cs_new_protected:Npn \msg_term:n #1
+ {
+ \iow_term:n { ************************************************* }
+ \iow_wrap:nnnN { * ~ #1} { * ~ } { } \iow_term:n
+ \iow_term:n { ************************************************* }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[deprecated = 2019-12-31]{\msg_interrupt:nnn}
+% \begin{macrocode}
+\__kernel_patch_deprecation:nnNNpn { 2019-12-31 } { [Defined~error~message] }
+\cs_new_protected:Npn \msg_interrupt:nnn #1#2#3
+ {
+ \tl_if_empty:nTF {#3}
+ {
+ \@@_old_interrupt_wrap:nn { \\ \c_@@_no_info_text_tl }
+ {#1 \\\\ #2 \\\\ \c_@@_continue_text_tl }
+ }
+ {
+ \@@_old_interrupt_wrap:nn { \\ #3 }
+ {#1 \\\\ #2 \\\\ \c_@@_help_text_tl }
+ }
+ }
+\cs_new_protected:Npn \@@_old_interrupt_wrap:nn #1#2
+ {
+ \iow_wrap:nnnN {#1} { | ~ } { } \@@_old_interrupt_more_text:n
+ \iow_wrap:nnnN {#2} { ! ~ } { } \@@_old_interrupt_text:n
+ }
+\cs_new_protected:Npn \@@_old_interrupt_more_text:n #1
+ {
+ \exp_args:Nx \tex_errhelp:D
+ {
+ |'''''''''''''''''''''''''''''''''''''''''''''''
+ #1 \iow_newline:
+ |...............................................
+ }
+ }
+\group_begin:
+ \char_set_lccode:nn {`\{} {`\ }
+ \char_set_lccode:nn {`\}} {`\ }
+ \char_set_lccode:nn {`\&} {`\!}
+ \char_set_catcode_active:N \&
+\tex_lowercase:D
+ {
+ \group_end:
+ \cs_new_protected:Npn \@@_old_interrupt_text:n #1
+ {
+ \iow_term:x
+ {
+ \iow_newline:
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ \iow_newline:
+ !
+ }
+ \__kernel_iow_with:Nnn \tex_newlinechar:D { `\^^J }
+ {
+ \__kernel_iow_with:Nnn \tex_errorcontextlines:D { -1 }
+ {
+ \group_begin:
+ \cs_set_protected:Npn &
+ {
+ \tex_errmessage:D
+ {
+ #1
+ \use_none:n
+ { ............................................ }
+ }
+ }
+ \exp_after:wN
+ \group_end:
+ &
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}