%%
%% This is file `l3msg.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% l3msg.dtx  (with options: `package')
%% 
%% EXPERIMENTAL CODE
%% 
%% Do not distribute this file without also distributing the
%% source files specified above.
%% 
%% Do not distribute a modified version of this file.
%% 
%% File: l3msg.dtx Copyright (C) 2009-2011 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
%% license or (at your option) any later version.  The latest version
%% of this license is in the file
%%
%%    http://www.latex-project.org/lppl.txt
%%
%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
%%
%% -----------------------------------------------------------------------
%%
%% The development version of the bundle can be found at
%%
%%    http://www.latex-project.org/svnroot/experimental/trunk/
%%
%% for those people who are interested.
%%
%%%%%%%%%%%
%% NOTE: %%
%%%%%%%%%%%
%%
%%   Snapshots taken from the repository represent work in progress and may
%%   not work or may contain conflicting material!  We therefore ask
%%   people _not_ to put them into distributions, archives, etc. without
%%   prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
\GetIdInfo$Id: l3msg.dtx 2896 2011-10-09 20:36:50Z joseph $
  {L3 Experimental messages}
\ProvidesExplPackage
  {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\package_check_loaded_expl:
\tl_new:N \l_msg_tmp_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_if_exist:cT { \c_msg_text_prefix_tl #1 / #2 }
      {
        \msg_kernel_error:nn { msg } { message-already-defined }
          {#1} {#2}
      }
    \msg_gset:nnnn {#1} {#2}
  }
\cs_new_protected:Npn \msg_new:nnn #1#2#3
  { \msg_new:nnnn {#1} {#2} {#3} { } }
\cs_new_protected:Npn \msg_set:nnnn #1#2#3#4
  {
    \cs_set:cpn { \c_msg_text_prefix_tl #1 / #2 }
      ##1##2##3##4 {#3}
    \cs_set:cpn { \c_msg_more_text_prefix_tl #1 / #2 }
      ##1##2##3##4 {#4}
  }
\cs_new_protected:Npn \msg_set:nnn #1#2#3
  { \msg_set:nnnn {#1} {#2} {#3} { } }
\cs_new_protected:Npn \msg_gset:nnnn #1#2#3#4
  {
    \cs_gset:cpn { \c_msg_text_prefix_tl #1 / #2 }
      ##1##2##3##4 {#3}
    \cs_gset:cpn { \c_msg_more_text_prefix_tl #1 / #2 }
      ##1##2##3##4 {#4}
  }
\cs_new_protected:Npn \msg_gset:nnn #1#2#3
  { \msg_gset:nnnn {#1} {#2} {#3} { } }
\tl_const:Nn \c_msg_coding_error_text_tl
  {
    This~is~a~coding~error.
    \\ \\
  }
\tl_const:Nn \c_msg_continue_text_tl
  { Type~<return>~to~continue }
\tl_const:Nn \c_msg_critical_text_tl
  { Reading~the~current~file~will~stop }
\tl_const:Nn \c_msg_fatal_text_tl
  { This~is~a~fatal~error:~LaTeX~will~abort }
\tl_const:Nn \c_msg_help_text_tl
  { For~immediate~help~type~H~<return> }
\tl_const:Nn \c_msg_no_info_text_tl
  {
    LaTeX~does~not~know~anything~more~about~this~error,~sorry.
    \c_msg_return_text_tl
  }
\tl_const:Nn \c_msg_on_line_text_tl { on~line }
\tl_const:Nn \c_msg_return_text_tl
  {
    \\ \\
    Try~typing~<return>~to~proceed.
    \\
    If~that~doesn't~work,~type~X~<return>~to~quit.
  }
\tl_const:Nn \c_msg_trouble_text_tl
  {
    \\ \\
    More~errors~will~almost~certainly~follow: \\
    the~LaTeX~run~should~be~aborted.
  }
\cs_new_nopar:Npn \msg_newline: { ^^J }
\cs_new_nopar:Npn \msg_two_newlines: { ^^J ^^J }
\cs_new_nopar:Npn \msg_line_number: { \int_use:N \tex_inputlineno:D }
\cs_set_nopar:Npn \msg_line_context:
  {
    \c_msg_on_line_text_tl
    \c_space_tl
    \msg_line_number:
  }
\char_set_catcode_letter:N \.
\tl_new:N
  \c_msg_hide_tl..........................................................
\tl_const:Nn \c_msg_hide_tl
 { \c_msg_hide_tl.......................................................... }
\char_set_catcode_other:N \.
\tl_new:N \l_msg_text_tl
\cs_new_protected:Npn \msg_interrupt:xxx #1#2#3
  {
    \group_begin:
      \tl_if_empty:nTF {#3}
        { \msg_interrupt_no_details:xx {#1} {#2} }
        { \msg_interrupt_details:xxx {#1} {#2} {#3} }
      \msg_interrupt_aux:
    \group_end:
  }
\cs_new_protected:Npn \msg_interrupt_no_details:xx #1#2
  {
    \iow_wrap:xnnnN
      { \\ \c_msg_no_info_text_tl }
      { |~ } { 2 } { } \msg_interrupt_more_text:n
    \iow_wrap:xnnnN { #1 \\ \\ #2 \\ \\ \c_msg_continue_text_tl }
      { ! ~ } { 2 } {} \msg_interrupt_text:n
  }
\cs_new_protected:Npn \msg_interrupt_details:xxx #1#2#3
  {
    \iow_wrap:xnnnN
      { \\ #3 }
      { |~ } { 2 } { } \msg_interrupt_more_text:n
    \iow_wrap:xnnnN { #1 \\ \\ #2 \\ \\ \c_msg_help_text_tl }
      { ! ~ } { 2 } { } \msg_interrupt_text:n
  }
\cs_new_protected:Npn \msg_interrupt_text:n #1
  { \tl_set:Nn \l_msg_text_tl {#1} }
\cs_new_protected:Npn \msg_interrupt_more_text:n #1
  {
    \protected@edef \l_msg_tmp_tl
    {
      |'''''''''''''''''''''''''''''''''''''''''''''''
      #1
      \msg_newline:
      |...............................................
    }
    \tex_errhelp:D \exp_after:wN { \l_msg_tmp_tl }
  }
\group_begin: % {
  \char_set_lccode:nn {`\}} {`\ }
  \char_set_lccode:nn {`\&} {`\!}
  \char_set_catcode_active:N \&
\tl_to_lowercase:n
  {
    \group_end:
    \cs_new_protected:Npn \msg_interrupt_aux:
      {
        \iow_term:x
          {
            \iow_newline:
            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            \iow_newline:
            !
          }
        \tl_put_right:No \l_msg_text_tl { \c_msg_hide_tl }
        \cs_set_protected_nopar:Npx &
          { \tex_errmessage:D { \exp_not:o { \l_msg_text_tl } } }
        &
      }
  }
\cs_new_protected:Npn \msg_log:x #1
  {
    \iow_log:x { ................................................. }
    \iow_wrap:xnnnN { . ~ #1} { . ~ } { 2 } { }
      \iow_log:x
    \iow_log:x { ................................................. }
  }
\cs_new_protected:Npn \msg_term:x #1
  {
    \iow_term:x { ************************************************* }
    \iow_wrap:xnnnN { * ~ #1} { * ~ } { 2 } { }
      \iow_term:x
    \iow_term:x { ************************************************* }
  }
\int_set:Nn \tex_errorcontextlines:D { -1 }
\cs_new_nopar:Npn \msg_fatal_text:n #1 { Fatal~#1~error }
\cs_new_nopar:Npn \msg_critical_text:n #1 { Critical~#1~error }
\cs_new_nopar:Npn \msg_error_text:n #1 { #1~error }
\cs_new_nopar:Npn \msg_warning_text:n #1 { #1~warning }
\cs_new_nopar:Npn \msg_info_text:n #1 { #1~info }
\cs_new_nopar:Npn \msg_see_documentation_text:n #1
  { \\ \\ See~the~#1~documentation~for~further~information. }
\prop_new:N \l_msg_redirect_classes_prop
\prop_new:N \l_msg_redirect_names_prop
\cs_new_protected_nopar:Npn \msg_class_set:nn #1#2
  {
    \prop_clear_new:c { l_msg_redirect_ #1 _prop }
    \cs_set_protected:cpn { msg_ #1 :nnxxxx } ##1##2##3##4##5##6
      { \msg_use:nnnnxxxx {#1} {#2} {##1} {##2} {##3} {##4} {##5} {##6} }
    \cs_set_protected:cpx { msg_ #1 :nnxxx } ##1##2##3##4##5
      { \exp_not:c { msg_ #1 :nnxxxx } {##1} {##2} {##3} {##4} {##5} { } }
    \cs_set_protected:cpx { msg_ #1 :nnxx } ##1##2##3##4
      { \exp_not:c { msg_ #1 :nnxxxx } {##1} {##2} {##3} {##4} { } { } }
    \cs_set_protected:cpx { msg_ #1 :nnx } ##1##2##3
      { \exp_not:c { msg_ #1 :nnxxxx } {##1} {##2} {##3} { } { } { } }
    \cs_set_protected:cpx { msg_ #1 :nn } ##1##2
      { \exp_not:c { msg_ #1 :nnxxxx } {##1} {##2} { } { } { } { } }
  }
\prg_set_conditional:Npnn \msg_if_more_text:N #1 { p , T , F , TF }
  {
    \cs_if_eq:NNTF #1 \msg_no_more_text:xxxx
      { \prg_return_false:  }
      { \prg_return_true: }
  }
\cs_new:Npn \msg_no_more_text:xxxx #1#2#3#4 { }
\cs_generate_variant:Nn \msg_if_more_text_p:N { c }
\cs_generate_variant:Nn \msg_if_more_text:NT  { c }
\cs_generate_variant:Nn \msg_if_more_text:NF  { c }
\cs_generate_variant:Nn \msg_if_more_text:NTF { c }
\msg_class_set:nn { fatal }
  {
    \msg_interrupt:xxx
      { \msg_fatal_text:n {#1} : ~ "#2" }
      {
        \use:c { \c_msg_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
        \msg_see_documentation_text:n {#1}
      }
      { \c_msg_fatal_text_tl }
    \tex_end:D
  }
\msg_class_set:nn { critical }
  {
    \msg_interrupt:xxx
      { \msg_critical_text:n {#1} : ~ "#2" }
      {
        \use:c { \c_msg_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
        \msg_see_documentation_text:n {#1}
      }
      { \c_msg_critical_text_tl }
    \tex_endinput:D
  }
\msg_class_set:nn { error }
  {
    \msg_if_more_text:cTF { \c_msg_more_text_prefix_tl #1 / #2 }
      {
        \msg_interrupt:xxx
          { \msg_error_text:n {#1} : ~ "#2" }
          {
            \use:c { \c_msg_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
            \msg_see_documentation_text:n {#1}
          }
          { \use:c { \c_msg_more_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} }
     }
     {
        \msg_interrupt:xxx
          { \msg_error_text:n {#1} : ~ "#2" }
          {
            \use:c { \c_msg_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
            \msg_see_documentation_text:n {#1}
          }
          { }
     }
  }
\msg_class_set:nn { warning }
  {
    \msg_term:x
      {
        \msg_warning_text:n {#1} : ~ "#2" \\ \\
        \use:c { \c_msg_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
      }
  }
\msg_class_set:nn { info }
  {
    \msg_log:x
      {
        \msg_info_text:n {#1} : ~ "#2" \\ \\
        \use:c { \c_msg_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6}
      }
  }
\msg_class_set:nn { log }
  {
    \msg_log:x
      { \use:c { \c_msg_text_prefix_tl #1 / #2 } {#3} {#4} {#5} {#6} }
  }
\msg_class_set:nn { none } { }
\seq_new:N \l_msg_redirect_classes_seq
\tl_new:N \l_msg_class_tl
\tl_new:N \l_msg_current_class_tl
\tl_new:N \l_msg_current_module_tl
\cs_new_protected:Npn \msg_use:nnnnxxxx #1#2#3#4#5#6#7#8
  {
    \cs_set_protected_nopar:Npx \msg_use_code:
      {
        \seq_clear:N \exp_not:N \l_msg_redirect_classes_seq
        \exp_not:n {#2}
      }
    \cs_set_protected:Npx \msg_use_loop:n ##1
      {
        \seq_if_in:NnTF \exp_not:n \l_msg_redirect_classes_seq {#1}
          { \msg_kernel_error:nn { msg }  { message-loop } {#1} }
          {
            \seq_put_right:Nn \exp_not:N \l_msg_redirect_classes_seq {#1}
            \exp_not:N \cs_if_exist:cTF { msg_ ##1 :nnxxxx }
              {
                \exp_not:N \use:c { msg_ ##1 :nnxxxx }
                  \exp_not:n { {#3} {#4} {#5} {#6} {#7} {#8} }
              }
              {
                \msg_kernel_error:nnx { msg } { message-class-unknown } {##1}
              }
          }
      }
    \cs_if_exist:cTF { \c_msg_text_prefix_tl #3 / #4 }
      { \msg_use_aux:nnn {#1} {#3} {#4} }
      { \msg_kernel_error:nnxx { msg } { message-unknown } {#3} {#4} }
  }
\cs_new_protected_nopar:Npn \msg_use_aux:nnn #1#2#3
  {
    \tl_set:Nn \l_msg_current_class_tl  {#1}
    \tl_set:Nn \l_msg_current_module_tl {#2}
    \prop_if_in:NnTF \l_msg_redirect_names_prop { // #2 / #3 / }
      { \msg_use_loop_check:nn { names } { // #2 / #3 / } }
      { \msg_use_aux:nn {#1} {#2} }
  }
\cs_new_protected_nopar:Npn \msg_use_aux:nn #1#2
  {
    \prop_if_in:cnTF { l_msg_redirect_ #1 _prop } {#2}
      { \msg_use_loop_check:nn {#1} {#2} }
      {
        \prop_if_in:cnTF { l_msg_redirect_ #1 _prop } { * }
          { \msg_use_loop_check:nn {#1} { * } }
          { \msg_use_code: }
      }
  }
\cs_new_protected:Npn \msg_use_loop_check:nn #1#2
  {
    \prop_get:cnN { l_msg_redirect_ #1 _prop } {#2} \l_msg_class_tl
    \tl_if_eq:NNTF \l_msg_current_class_tl \l_msg_class_tl
      {
        { \msg_use_code: }
        { \msg_use_loop:o \l_msg_class_tl }
      }
  }
\cs_new_protected_nopar:Npn \msg_use_code: { }
\cs_new_protected:Npn \msg_use_loop:n #1 { }
\cs_generate_variant:Nn \msg_use_loop:n { o }
\cs_new_protected_nopar:Npn \msg_redirect_class:nn #1#2
  { \prop_put:cnn { l_msg_redirect_ #1 _prop } { * } {#2} }
\cs_new_protected_nopar:Npn \msg_redirect_module:nnn #1#2#3
  { \prop_put:cnn { l_msg_redirect_ #2 _prop } {#1} {#3} }
\cs_new_protected_nopar:Npn \msg_redirect_name:nnn #1#2#3
  { \prop_put:Nnn \l_msg_redirect_names_prop { // #1 / #2 / } {#3} }
\cs_new_protected_nopar:Npn \msg_kernel_new:nnnn #1#2
  { \msg_new:nnnn { LaTeX } { #1 / #2 } }
\cs_new_protected_nopar:Npn \msg_kernel_new:nnn #1#2
  { \msg_new:nnn { LaTeX } { #1 / #2 } }
\cs_new_protected_nopar:Npn \msg_kernel_set:nnnn #1#2
  { \msg_set:nnnn { LaTeX } { #1 / #2 } }
\cs_new_protected_nopar:Npn \msg_kernel_set:nnn #1#2
  { \msg_set:nnn { LaTeX } { #1 / #2 } }
\cs_new_protected:Npn \msg_kernel_fatal:nnxxxx #1#2#3#4#5#6
  {
    \msg_interrupt:xxx
      { \msg_fatal_text:n { LaTeX } : ~ "#1 / #2" }
      {
        \use:c { \c_msg_text_prefix_tl LaTeX / #1 / #2 }
          {#3} {#4} {#5} {#6}
        \msg_see_documentation_text:n { LaTeX3 }
      }
      { \c_msg_fatal_text_tl }
    \tex_end:D
  }
\cs_new_protected:Npn \msg_kernel_fatal:nnxxx #1#2#3#4#5
  {\msg_kernel_fatal:nnxxxx {#1} {#2} {#3} {#4} {#5} { } }
\cs_new_protected:Npn \msg_kernel_fatal:nnxx #1#2#3#4
  { \msg_kernel_fatal:nnxxxx {#1} {#2} {#3} {#4} { } { } }
\cs_new_protected:Npn \msg_kernel_fatal:nnx #1#2#3
  { \msg_kernel_fatal:nnxxxx {#1} {#2} {#3} { } { } { } }
\cs_new_protected:Npn \msg_kernel_fatal:nn #1#2
  { \msg_kernel_fatal:nnxxxx {#1} {#2} { } { } { } { } }
\cs_new_protected:Npn \msg_kernel_error:nnxxxx #1#2#3#4#5#6
  {
    \msg_if_more_text:cTF { \c_msg_more_text_prefix_tl LaTeX / #1 / #2 }
      {
        \msg_interrupt:xxx
          { \msg_error_text:n { LaTeX } : ~ " #1 / #2 " }
          {
            \use:c { \c_msg_text_prefix_tl LaTeX / #1 / #2 }
              {#3} {#4} {#5} {#6}
            \msg_see_documentation_text:n { LaTeX3 }
          }
          {
            \use:c { \c_msg_more_text_prefix_tl LaTeX / #1 / #2 }
              {#3} {#4} {#5} {#6}
          }
      }
      {
        \msg_interrupt:xxx
          { \msg_error_text:n { LaTeX } : ~ " #1 / #2 " }
          {
            \use:c { \c_msg_text_prefix_tl LaTeX / #1 / #2 }
              {#3} {#4} {#5} {#6}
            \msg_see_documentation_text:n { LaTeX3 }
          }
          { }
      }
  }
\cs_new_protected:Npn \msg_kernel_error:nnxxx #1#2#3#4#5
  {\msg_kernel_error:nnxxxx {#1} {#2} {#3} {#4} {#5} { } }
\cs_set_protected:Npn \msg_kernel_error:nnxx #1#2#3#4
  { \msg_kernel_error:nnxxxx {#1} {#2} {#3} {#4} { } { } }
\cs_set_protected:Npn \msg_kernel_error:nnx #1#2#3
  { \msg_kernel_error:nnxxxx {#1} {#2} {#3} { } { } { } }
\cs_set_protected:Npn \msg_kernel_error:nn #1#2
  { \msg_kernel_error:nnxxxx {#1} {#2} { } { } { } { } }
\prop_new:N \l_msg_redirect_kernel_warning_prop
\cs_new_protected:Npn \msg_kernel_warning:nnxxxx #1#2#3#4#5#6
  {
    \msg_use:nnnnxxxx { warning }
      {
        \msg_term:x
          {
            \msg_warning_text:n { LaTeX } : ~ " #1 / #2 " \\ \\
            \use:c { \c_msg_text_prefix_tl LaTeX / #1 / #2 }
              {#3} {#4} {#5} {#6}
          }
      }
      { LaTeX } { #1 / #2 } {#3} {#4} {#5} {#6}
  }
\cs_new_protected:Npn \msg_kernel_warning:nnxxx #1#2#3#4#5
  { \msg_kernel_warning:nnxxxx {#1} {#2} {#3} {#4} {#5} { } }
\cs_new_protected:Npn \msg_kernel_warning:nnxx #1#2#3#4
  { \msg_kernel_warning:nnxxxx {#1} {#2} {#3} {#4} { } { } }
\cs_new_protected:Npn \msg_kernel_warning:nnx #1#2#3
  { \msg_kernel_warning:nnxxxx {#1} {#2} {#3} { } { } { } }
\cs_new_protected:Npn \msg_kernel_warning:nn #1#2
  { \msg_kernel_warning:nnxxxx {#1} {#2} { } { } { } { } }
\prop_new:N \l_msg_redirect_kernel_info_prop
\cs_new_protected:Npn \msg_kernel_info:nnxxxx #1#2#3#4#5#6
  {
    \msg_use:nnnnxxxx { info }
      {
        \msg_log:x
          {
            \msg_info_text:n { LaTeX } : ~ " #1 / #2 " \\ \\
            \use:c { \c_msg_text_prefix_tl LaTeX / #1 / #2 }
              {#3} {#4} {#5} {#6}
          }
      }
      { LaTeX } { #1 / #2 } {#3} {#4} {#5} {#6}
  }
\cs_new_protected:Npn \msg_kernel_info:nnxxx #1#2#3#4#5
  { \msg_kernel_info:nnxxxx {#1} {#2} {#3} {#4} {#5} { } }
\cs_new_protected:Npn \msg_kernel_info:nnxx #1#2#3#4
  { \msg_kernel_info:nnxxxx {#1} {#2} {#3} {#4} { } { } }
\cs_new_protected:Npn \msg_kernel_info:nnx #1#2#3
  { \msg_kernel_info:nnxxxx {#1} {#2} {#3} { } { } { } }
\cs_new_protected:Npn \msg_kernel_info:nn #1#2
  { \msg_kernel_info:nnxxxx {#1} {#2} { } { } { } { } }
\msg_kernel_new:nnnn { msg } { message-already-defined }
  { Message~'#2'~for~module~'#1'~already~defined. }
  {
    \c_msg_coding_error_text_tl
    LaTeX~was~asked~to~define~a~new~message~called~'#2'
    by~the~module~'#1'~module:\\
    this~message~already~exists.
    \c_msg_return_text_tl
  }
\msg_kernel_new:nnnn { msg } { message-unknown }
  { Unknown~message~'#2'~for~module~'#1'. }
  {
    \c_msg_coding_error_text_tl
    LaTeX~was~asked~to~display~a~message~called~'#2'\\
    by~the~module~'#1'~module:~this~message~does~not~exist.
    \c_msg_return_text_tl
  }
\msg_kernel_new:nnnn { msg } { message-class-unknown }
  { Unknown~message~class~'#1'. }
  {
    LaTeX~has~been~asked~to~redirect~messages~to~a~class~'#1':\\
    this~was~never~defined.
    \c_msg_return_text_tl
  }
\msg_kernel_new:nnnn { msg } { redirect-loop }
  { Message~redirection~loop~for~message~class~'#1'. }
  {
    LaTeX~has~been~asked~to~redirect~messages~in~an~infinite~loop.\\
    The~original~message~here~has~been~lost.
    \c_msg_return_text_tl
  }
\msg_kernel_new:nnnn { kernel } { bad-number-of-arguments }
  { Function~'#1'~cannot~be~defined~with~#2~arguments. }
  {
    \c_msg_coding_error_text_tl
    LaTeX~has~been~asked~to~define~a~function~'#1'~with~
    #2~arguments. \\
    TeX~allows~between~0~and~9~arguments~for~a~single~function.
  }
\msg_kernel_new:nnnn { kernel } { command-already-defined }
  { Control~sequence~#1~already~defined. }
  {
    \c_msg_coding_error_text_tl
    LaTeX~has~been~asked~to~create~a~new~control~sequence~'#1'~
    but~this~name~has~already~been~used~elsewhere. \\ \\
    The~current~meaning~is:\\
    \ \ #2
  }
\msg_kernel_new:nnnn { kernel } { command-not-defined }
  { Control~sequence~#1~undefined. }
  {
    \c_msg_coding_error_text_tl
    LaTeX~has~been~asked~to~use~a~command~#1,~but~this~has~not~
    been~defined~yet.
  }
\msg_kernel_new:nnnn { kernel } { variable-not-defined }
  { Variable~#1~undefined. }
  {
    \c_msg_coding_error_text_tl
    LaTeX~has~been~asked~to~show~a~variable~#1,~but~this~has~not~
    been~defined~yet.
  }
\msg_kernel_new:nnnn { seq } { empty-sequence }
  { Empty~sequence~#1. }
  {
    \c_msg_coding_error_text_tl
    LaTeX~has~been~asked~to~recover~an~entry~from~a~sequence~that~
    has~no~content:~that~cannot~happen!
  }
\msg_kernel_new:nnnn { tl } { empty-search-pattern }
  { Empty~search~pattern. }
  {
    \c_msg_coding_error_text_tl
    LaTeX~has~been~asked~to~replace~an~empty~pattern~by~'#1':~that~%
    would~lead~to~an~infinite~loop!
  }
\cs_set_protected:Npn \msg_kernel_bug:x #1
  {
    \msg_interrupt:xxx { \c_msg_kernel_bug_text_tl }
      {
        #1
       \msg_see_documentation_text:n { LaTeX3 }
      }
      { \c_msg_kernel_bug_more_text_tl }
  }
\tl_const:Nn \c_msg_kernel_bug_text_tl
  { This~is~a~LaTeX~bug:~check~coding! }
\tl_const:Nn \c_msg_kernel_bug_more_text_tl
  {
    There~is~a~coding~bug~somewhere~around~here. \\
    This~probably~needs~examining~by~an~expert.
    \c_msg_return_text_tl
  }
\group_begin:
\char_set_catcode_math_superscript:N \^
\char_set_lccode:nn {`^} {`\ }
\char_set_lccode:nn {`L} {`L}
\char_set_lccode:nn {`T} {`T}
\char_set_lccode:nn {`X} {`X}
\tl_to_lowercase:n
  {
    \cs_new:Npx \msg_expandable_error:n #1
      {
        \exp_not:n
          {
            \tex_romannumeral:D
            \exp_after:wN \exp_after:wN
            \exp_after:wN \msg_expandable_error_aux:w
            \exp_after:wN \exp_after:wN
            \exp_after:wN \c_zero
          }
        \exp_not:N \use:n { \exp_not:c { LaTeX3~error: } ^ #1 }
        \exp_not:N \q_stop
      }
    \cs_new:Npn \msg_expandable_error_aux:w #1 ^ #2 \q_stop { #1 }
  }
\group_end:
%% 
%%
%% End of file `l3msg.sty'.
