summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-02-28 00:40:51 +0000
committerKarl Berry <karl@freefriends.org>2012-02-28 00:40:51 +0000
commit29c459636115f7de4ae9a8681927b52a1e896805 (patch)
tree5200a1da0c7a7bae64d8c07c48df4a5daf30323e /Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
parente20ea4bdd670e0418363a2a38a54b422a4d83231 (diff)
l3kernel 3471 (26feb12)
git-svn-id: svn://tug.org/texlive/trunk@25525 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3msg.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3msg.dtx59
1 files changed, 47 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index e0cb6029a79..472196ac62a 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -35,7 +35,7 @@
%
%<*driver|package>
\RequirePackage{l3names}
-\GetIdInfo$Id: l3msg.dtx 3316 2012-02-06 12:24:43Z bruno $
+\GetIdInfo$Id: l3msg.dtx 3470 2012-02-26 19:10:24Z bruno $
{L3 Experimental messages}
%</driver|package>
%<*driver>
@@ -431,9 +431,9 @@
% from sources other than \meta{module} are not affected by this
% redirection. This function can be used to make some messages
% \enquote{silent} by default. For example, all of the
-% \texttt{trace} messages of \meta{module} could be turned off with:
+% \texttt{warning} messages of \meta{module} could be turned off with:
% \begin{verbatim}
-% \msg_redirect_module:nnn { module } { trace } { none }
+% \msg_redirect_module:nnn { module } { warning } { none }
% \end{verbatim}
% \end{function}
%
@@ -677,7 +677,7 @@
%
% \begin{function}{\msg_aux_use:nn, \msg_aux_use:nnxxxx}
% \begin{syntax}
-% \cs{msg_aux_use:nnxx} \Arg{module} \Arg{message}
+% \cs{msg_aux_use:nnxxxx} \Arg{module} \Arg{message}
% ~~\Arg{arg one} \Arg{arg two} \Arg{arg three} \Arg{arg four}
% \end{syntax}
% Prints the \meta{message} from \meta{module} in the terminal,
@@ -688,9 +688,10 @@
% \begin{syntax}
% \cs{msg_aux_show:x} \Arg{formatted string}
% \end{syntax}
-% Shows the \meta{formatted string} on the terminal.
-% The \meta{formatted string} must start with |^^J>|,
-% failure to do so causes low-level \TeX{} errors.
+% Shows the \meta{formatted string} on the terminal. After expansion,
+% unless it is empty, the \meta{formatted string} must contain |>|,
+% and the part of \meta{formatted string} before the first |>| is
+% removed. Failure to do so causes low-level \TeX{} errors.
% \end{function}
%
% \begin{function}{\msg_aux_show:Nnx}
@@ -740,6 +741,37 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{macro}[aux]{\chk_if_free_msg:nn}
+% This auxiliary is similar to \cs{chk_if_free_cs:N}, and is used when
+% defining messages with \cs{msg_new:nnnn}. It could be inlined in
+% \cs{msg_new:nnnn}, but the experimental \pkg{l3trace} module needs
+% to disable this check when reloading a package with the extra
+% tracing information.
+% \begin{macrocode}
+\cs_new_protected:Npn \chk_if_free_msg:nn #1#2
+ {
+ \cs_if_free:cF { \c_msg_text_prefix_tl #1 / #2 }
+ {
+ \msg_kernel_error:nnxx { msg } { message-already-defined }
+ {#1} {#2}
+ }
+ }
+%<*package>
+\tex_ifodd:D \l@expl@log@functions@bool
+ \cs_gset_protected:Npn \chk_if_free_msg:nn #1#2
+ {
+ \cs_if_free:cF { \c_msg_text_prefix_tl #1 / #2 }
+ {
+ \msg_kernel_error:nnxx { msg } { message-already-defined }
+ {#1} {#2}
+ }
+ \iow_log:x { Defining~message~#1/#2~ \msg_line_context: }
+ }
+\fi:
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\msg_new:nnnn, \msg_new:nnn}
% \begin{macro}{\msg_gset:nnnn,\msg_gset:nnn}
% \begin{macro}{\msg_set:nnnn, \msg_set:nnn}
@@ -748,11 +780,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \msg_new:nnnn #1#2
{
- \cs_if_exist:cT { \c_msg_text_prefix_tl #1 / #2 }
- {
- \msg_kernel_error:nnxx { msg } { message-already-defined }
- {#1} {#2}
- }
+ \chk_if_free_msg:nn {#1} {#2}
\msg_gset:nnnn {#1} {#2}
}
\cs_new_protected:Npn \msg_new:nnn #1#2#3
@@ -1614,6 +1642,13 @@
LaTeX~has~been~asked~to~use~a~command~#1,~but~this~has~not~
been~defined~yet.
}
+\msg_kernel_new:nnnn { kernel } { out-of-registers }
+ { No~room~for~a~new~#1. }
+ {
+ TeX~only~supports~\int_use:N \c_max_register_int \
+ of~each~type.~All~the~#1~registers~have~been~used.~
+ This~run~will~be~aborted~now.
+ }
\msg_kernel_new:nnnn { kernel } { variable-not-defined }
{ Variable~#1~undefined. }
{