diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3msg.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3msg.sty | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty b/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty index 1531c7a39b1..af40a84ac92 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3msg.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \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} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -54,13 +54,28 @@ \tl_new:N \l_msg_internal_tl \tl_const:Nn \c_msg_text_prefix_tl { msg~text~>~ } \tl_const:Nn \c_msg_more_text_prefix_tl { msg~extra~text~>~ } -\cs_new_protected:Npn \msg_new:nnnn #1#2 +\cs_new_protected:Npn \chk_if_free_msg:nn #1#2 { - \cs_if_exist:cT { \c_msg_text_prefix_tl #1 / #2 } + \cs_if_free:cF { \c_msg_text_prefix_tl #1 / #2 } { \msg_kernel_error:nnxx { msg } { message-already-defined } {#1} {#2} } + } +\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: +\cs_new_protected:Npn \msg_new:nnnn #1#2 + { + \chk_if_free_msg:nn {#1} {#2} \msg_gset:nnnn {#1} {#2} } \cs_new_protected:Npn \msg_new:nnn #1#2#3 @@ -534,6 +549,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. } { |