From b95d7e12e4b85cb577f3efc950cf50413dfea72b Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 7 May 2021 20:16:16 +0000
Subject: l3 (7may21)

git-svn-id: svn://tug.org/texlive/trunk@59118 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/source/latex/l3kernel/l3msg.dtx | 181 +++++++++++++---------
 1 file changed, 111 insertions(+), 70 deletions(-)

(limited to 'Master/texmf-dist/source/latex/l3kernel/l3msg.dtx')

diff --git a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
index e51d93a30e9..b408c181b26 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
 %    }^^A
 % }
 %
-% \date{Released 2021-02-18}
+% \date{Released 2021-05-07}
 %
 % \maketitle
 %
@@ -665,7 +665,7 @@
   {
     \msg_if_exist:nnT {#1} {#2}
       {
-        \__kernel_msg_error:nnxx { kernel } { message-already-defined }
+        \__kernel_msg_error:nnxx { msg } { already-defined }
           {#1} {#2}
       }
   }
@@ -1370,7 +1370,7 @@
 \cs_new:Npn \@@_class_chk_exist:nT #1
   {
     \cs_if_free:cTF { @@_ #1 _code:nnnnnn }
-      { \__kernel_msg_error:nnx { kernel } { message-class-unknown } {#1} }
+      { \__kernel_msg_error:nnx { msg } { class-unknown } {#1} }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -1440,7 +1440,7 @@
             \@@_use_redirect_name:n { #2 / #3 }
           }
       }
-      { \__kernel_msg_error:nnxx { kernel } { message-unknown } {#2} {#3} }
+      { \__kernel_msg_error:nnxx { msg } { unknown } {#2} {#3} }
     \cs_if_exist_use:N \conditionally@traceon
   }
 \cs_new_protected:Npn \@@_use_code: { }
@@ -1591,7 +1591,7 @@
               {
                 \prop_put:cnn { l_@@_redirect_ #2 _prop } {#3} {#2}
                 \__kernel_msg_warning:nnxxxx
-                  { kernel } { message-redirect-loop }
+                  { msg } { redirect-loop }
                   { \seq_item:Nn \l_@@_class_loop_seq { 1 } }
                   { \seq_item:Nn \l_@@_class_loop_seq { 2 } }
                   {#3}
@@ -1756,6 +1756,22 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}
+%   {
+%     \__kernel_msg_log:nnnnnn, \__kernel_msg_log:nnxxxx,
+%     \__kernel_msg_show:nnnnnn, \__kernel_msg_show:nnxxxx
+%   }
+%   For showing messages.
+%    \begin{macrocode}
+\cs_new_protected:Npn \__kernel_msg_log:nnnnnn #1
+  { \msg_log:nnnnnn { LaTeX / #1 } }
+\cs_generate_variant:Nn \__kernel_msg_log:nnnnnn { nnxxxx }
+\cs_new_protected:Npn \__kernel_msg_show:nnnnnn #1
+  { \msg_show:nnnnnn { LaTeX / #1 } }
+\cs_generate_variant:Nn \__kernel_msg_show:nnnnnn { nnxxxx }
+%    \end{macrocode}
+% \end{macro}
+%
 % End the group to eliminate \cs{@@_kernel_class_new:nN}.
 %    \begin{macrocode}
 \group_end:
@@ -1764,7 +1780,7 @@
 % Error messages needed to actually implement the message system
 % itself.
 %    \begin{macrocode}
-\__kernel_msg_new:nnnn { kernel } { message-already-defined }
+\__kernel_msg_new:nnnn { msg } { already-defined }
   { Message~'#2'~for~module~'#1'~already~defined. }
   {
     \c_@@_coding_error_text_tl
@@ -1772,7 +1788,7 @@
     by~the~module~'#1':~this~message~already~exists.
     \c_@@_return_text_tl
   }
-\__kernel_msg_new:nnnn { kernel } { message-unknown }
+\__kernel_msg_new:nnnn { msg } { unknown }
   { Unknown~message~'#2'~for~module~'#1'. }
   {
     \c_@@_coding_error_text_tl
@@ -1780,14 +1796,14 @@
     by~the~module~'#1':~this~message~does~not~exist.
     \c_@@_return_text_tl
   }
-\__kernel_msg_new:nnnn { kernel } { message-class-unknown }
+\__kernel_msg_new:nnnn { msg } { class-unknown }
   { Unknown~message~class~'#1'. }
   {
     LaTeX~has~been~asked~to~redirect~messages~to~a~class~'#1':\\
     this~was~never~defined.
     \c_@@_return_text_tl
   }
-\__kernel_msg_new:nnnn { kernel } { message-redirect-loop }
+\__kernel_msg_new:nnnn { msg } { redirect-loop }
   {
     Message~redirection~loop~caused~by~ {#1} ~=>~ {#2}
     \tl_if_empty:nF {#3} { ~for~module~' \use_none:n #3 ' } .
@@ -1811,16 +1827,6 @@
     #2~arguments.~
     TeX~allows~between~0~and~9~arguments~for~a~single~function.
   }
-\__kernel_msg_new:nnn { kernel } { char-active }
-  { Cannot~generate~active~chars. }
-\__kernel_msg_new:nnn { kernel } { char-invalid-catcode }
-  { Invalid~catcode~for~char~generation. }
-\__kernel_msg_new:nnn { kernel } { char-null-space }
-  { Cannot~generate~null~char~as~a~space. }
-\__kernel_msg_new:nnn { kernel } { char-out-of-range }
-  { Charcode~requested~out~of~engine~range. }
-\__kernel_msg_new:nnn { kernel } { char-space }
-  { Cannot~generate~space~chars. }
 \__kernel_msg_new:nnnn { kernel } { command-already-defined }
   { Control~sequence~#1~already~defined. }
   {
@@ -1898,7 +1904,55 @@
     LaTeX~has~been~asked~to~define~the~conditional~form~'#1'~of~
     the~function~'#2',~but~only~'TF',~'T',~'F',~and~'p'~forms~exist.
   }
-\__kernel_msg_new:nnnn { kernel } { key-no-property }
+\__kernel_msg_new:nnnn { kernel } { variant-too-long }
+  { Variant~form~'#1'~longer~than~base~signature~of~'#2'. }
+  {
+    \c_@@_coding_error_text_tl
+    LaTeX~has~been~asked~to~create~a~variant~of~the~function~'#2'~
+    with~a~signature~starting~with~'#1',~but~that~is~longer~than~
+    the~signature~(part~after~the~colon)~of~'#2'.
+  }
+\__kernel_msg_new:nnnn { kernel } { invalid-variant }
+  { Variant~form~'#1'~invalid~for~base~form~'#2'. }
+  {
+    \c_@@_coding_error_text_tl
+    LaTeX~has~been~asked~to~create~a~variant~of~the~function~'#2'~
+    with~a~signature~starting~with~'#1',~but~cannot~change~an~argument~
+    from~type~'#3'~to~type~'#4'.
+  }
+\__kernel_msg_new:nnnn { kernel } { invalid-exp-args }
+  { Invalid~variant~specifier~'#1'~in~'#2'. }
+  {
+    \c_@@_coding_error_text_tl
+    LaTeX~has~been~asked~to~create~an~\iow_char:N\\exp_args:N...~
+    function~with~signature~'N#2'~but~'#1'~is~not~a~valid~argument~
+    specifier.
+  }
+\__kernel_msg_new:nnn { kernel } { deprecated-variant }
+  {
+    Variant~form~'#1'~deprecated~for~base~form~'#2'.~
+    One~should~not~change~an~argument~from~type~'#3'~to~type~'#4'
+    \str_case:nnF {#3}
+      {
+        { n } { :~use~a~'\token_if_eq_charcode:NNTF #4 c v V'~variant? }
+        { N } { :~base~form~only~accepts~a~single~token~argument. }
+        {#4} { :~base~form~is~already~a~variant. }
+      } { . }
+  }
+\__kernel_msg_new:nnn { char } { active }
+  { Cannot~generate~active~chars. }
+\__kernel_msg_new:nnn { char } { invalid-catcode }
+  { Invalid~catcode~for~char~generation. }
+\__kernel_msg_new:nnn { char } { null-space }
+  { Cannot~generate~null~char~as~a~space. }
+\__kernel_msg_new:nnn { char } { out-of-range }
+  { Charcode~requested~out~of~engine~range. }
+\__kernel_msg_new:nnn { char } { space }
+  { Cannot~generate~space~chars. }
+\__kernel_msg_new:nnnn { ior } { quote-in-shell }
+  { Quotes~in~shell~command~'#1'. }
+  { Shell~commands~cannot~contain~quotes~("). }
+\__kernel_msg_new:nnnn { keys } { no-property }
   { No~property~given~in~definition~of~key~'#1'. }
   {
     \c_@@_coding_error_text_tl
@@ -1907,30 +1961,27 @@
     \iow_indent:n { #1 .<property> } \\ \\
     LaTeX~did~not~find~a~'.'~to~indicate~the~start~of~a~property.
   }
-\__kernel_msg_new:nnnn { kernel } { key-property-boolean-values-only }
+\__kernel_msg_new:nnnn { keys } { property-boolean-values-only }
   { The~property~'#1'~accepts~boolean~values~only. }
   {
     \c_@@_coding_error_text_tl
     The~property~'#1'~only~accepts~the~values~'true'~and~'false'.
   }
-\__kernel_msg_new:nnnn { kernel } { key-property-requires-value }
+\__kernel_msg_new:nnnn { keys } { property-requires-value }
   { The~property~'#1'~requires~a~value. }
   {
     \c_@@_coding_error_text_tl
     LaTeX~was~asked~to~set~property~'#1'~for~key~'#2'.\\
     No~value~was~given~for~the~property,~and~one~is~required.
   }
-\__kernel_msg_new:nnnn { kernel } { key-property-unknown }
+\__kernel_msg_new:nnnn { keys } { property-unknown }
   { The~key~property~'#1'~is~unknown. }
   {
     \c_@@_coding_error_text_tl
     LaTeX~has~been~asked~to~set~the~property~'#1'~for~key~'#2':~
     this~property~is~not~defined.
   }
-\__kernel_msg_new:nnnn { kernel } { quote-in-shell }
-  { Quotes~in~shell~command~'#1'. }
-  { Shell~commands~cannot~contain~quotes~("). }
-\__kernel_msg_new:nnnn { kernel } { invalid-quark-function }
+\__kernel_msg_new:nnnn { quark } { invalid-function }
   { Quark~test~function~'#1'~is~invalid. }
   {
     \c__msg_coding_error_text_tl
@@ -1940,16 +1991,16 @@
       { with~signature~'#2',~but~that~signature~ }
     is~not~valid.
   }
-\__kernel_msg_new:nnn { kernel } { invalid-quark }
+\__kernel_msg_new:nnn { quark } { invalid }
   { Invalid~quark~variable~'#1'. }
-\__kernel_msg_new:nnnn { kernel } { scanmark-already-defined }
+\__kernel_msg_new:nnnn { scanmark } { already-defined }
   { Scan~mark~#1~already~defined. }
   {
     \c_@@_coding_error_text_tl
     LaTeX~has~been~asked~to~create~a~new~scan~mark~'#1'~
     but~this~name~has~already~been~used~for~a~scan~mark.
   }
-\__kernel_msg_new:nnnn { kernel } { shuffle-too-large }
+\__kernel_msg_new:nnnn { seq } { shuffle-too-large }
   { The~sequence~#1~is~too~long~to~be~shuffled~by~TeX. }
   {
     TeX~has~ \int_eval:n { \c_max_register_int + 1 } ~
@@ -1964,40 +2015,30 @@
     LaTeX~has~been~asked~to~show~a~variable~#1,~but~this~has~not~
     been~defined~yet.
   }
-\__kernel_msg_new:nnnn { kernel } { variant-too-long }
-  { Variant~form~'#1'~longer~than~base~signature~of~'#2'. }
-  {
-    \c_@@_coding_error_text_tl
-    LaTeX~has~been~asked~to~create~a~variant~of~the~function~'#2'~
-    with~a~signature~starting~with~'#1',~but~that~is~longer~than~
-    the~signature~(part~after~the~colon)~of~'#2'.
-  }
-\__kernel_msg_new:nnnn { kernel } { invalid-variant }
-  { Variant~form~'#1'~invalid~for~base~form~'#2'. }
+\__kernel_msg_new:nnnn { kernel } { bad-type }
+  { Variable~'#1'~is~not~a~valid~#3. }
   {
     \c_@@_coding_error_text_tl
-    LaTeX~has~been~asked~to~create~a~variant~of~the~function~'#2'~
-    with~a~signature~starting~with~'#1',~but~cannot~change~an~argument~
-    from~type~'#3'~to~type~'#4'.
+    The~variable~'#1'~with~\tl_if_empty:nTF {#4} {meaning} {value}\\\\
+    \iow_indent:n {#2}\\\\
+    should~be~a~#3~variable,~but~
+    \tl_if_empty:nTF {#4}
+      { it~is~not \str_if_eq:nnF {#3} { bool } { ~a~short~macro } . }
+      {
+        it~does~not~have~the~correct~
+        \str_if_eq:nnTF {#2} {#4}
+          { category~codes. }
+          { internal~structure:\\\\\iow_indent:n {#4} }
+      }
   }
-\__kernel_msg_new:nnnn { kernel } { invalid-exp-args }
-  { Invalid~variant~specifier~'#1'~in~'#2'. }
+\__kernel_msg_new:nnnn { kernel } { non-clist }
+  { Variable~'#1'~is~not~a~valid~clist. }
   {
     \c_@@_coding_error_text_tl
-    LaTeX~has~been~asked~to~create~an~\iow_char:N\\exp_args:N...~
-    function~with~signature~'N#2'~but~'#1'~is~not~a~valid~argument~
-    specifier.
-  }
-\__kernel_msg_new:nnn { kernel } { deprecated-variant }
-  {
-    Variant~form~'#1'~deprecated~for~base~form~'#2'.~
-    One~should~not~change~an~argument~from~type~'#3'~to~type~'#4'
-    \str_case:nnF {#3}
-      {
-        { n } { :~use~a~'\token_if_eq_charcode:NNTF #4 c v V'~variant? }
-        { N } { :~base~form~only~accepts~a~single~token~argument. }
-        {#4} { :~base~form~is~already~a~variant. }
-      } { . }
+    The~variable~'#1'~with~value\\\\
+    \iow_indent:n {#2}\\\\
+    should~be~a~clist~variable,~but~it~includes~empty~or~blank~items~
+    without~braces.
   }
 %    \end{macrocode}
 %
@@ -2006,7 +2047,7 @@
 % \texttt{log-functions}, or on the contrary if debugging is turned off.
 % In format mode the error is somewhat different.
 %    \begin{macrocode}
-\__kernel_msg_new:nnnn { kernel } { enable-debug }
+\__kernel_msg_new:nnnn { debug } { enable-debug }
   { To~use~'#1'~set~the~'enable-debug'~option. }
   {
     The~function~'#1'~will~be~ignored~because~it~can~only~work~if~
@@ -2024,13 +2065,13 @@
   { Misused~\exp_end_continue_f:w or~:nw }
 \__kernel_msg_new:nnn { kernel } { bad-variable }
   { Erroneous~variable~#1 used! }
-\__kernel_msg_new:nnn { kernel } { misused-sequence }
+\__kernel_msg_new:nnn { seq } { misused }
   { A~sequence~was~misused. }
-\__kernel_msg_new:nnn { kernel } { misused-prop }
+\__kernel_msg_new:nnn { prop } { misused }
   { A~property~list~was~misused. }
-\__kernel_msg_new:nnn { kernel } { negative-replication }
+\__kernel_msg_new:nnn { prg } { negative-replication }
   { Negative~argument~for~\iow_char:N\\prg_replicate:nn. }
-\__kernel_msg_new:nnn { kernel } { prop-keyval }
+\__kernel_msg_new:nnn { prop } { prop-keyval }
   { Missing/extra~'='~in~'#1'~(in~'..._keyval:Nn') }
 \__kernel_msg_new:nnn { kernel } { unknown-comparison }
   { Relation~'#1'~unknown:~use~=,~<,~>,~==,~!=,~<=,~>=. }
@@ -2045,23 +2086,23 @@
 %
 % Messages used by the \enquote{\texttt{show}} functions.
 %    \begin{macrocode}
-\__kernel_msg_new:nnn { kernel } { show-clist }
+\__kernel_msg_new:nnn { clist } { show }
   {
     The~comma~list~ \tl_if_empty:nF {#1} { #1 ~ }
     \tl_if_empty:nTF {#2}
       { is~empty \\>~ . }
       { contains~the~items~(without~outer~braces): #2 . }
   }
-\__kernel_msg_new:nnn { kernel } { show-intarray }
+\__kernel_msg_new:nnn { intarray } { show }
   { The~integer~array~#1~contains~#2~items: \\ #3 . }
-\__kernel_msg_new:nnn { kernel } { show-prop }
+\__kernel_msg_new:nnn { prop } { show }
   {
     The~property~list~#1~
     \tl_if_empty:nTF {#2}
       { is~empty \\>~ . }
       { contains~the~pairs~(without~outer~braces): #2 . }
   }
-\__kernel_msg_new:nnn { kernel } { show-seq }
+\__kernel_msg_new:nnn { seq } { show }
   {
     The~sequence~#1~
     \tl_if_empty:nTF {#2}
@@ -2103,14 +2144,14 @@
 % \begin{macro}{\@@_expandable_error:w}
 %   In expansion only context, we cannot use the normal means of
 %   reporting errors. Instead, we feed \TeX{} an undefined control
-%   sequence, \cs{LaTeX3 error:}. It is thus interrupted, and shows
+%   sequence, \cs[module = {}]{LaTeX3 error:}. It is thus interrupted, and shows
 %   the context, which thanks to the odd-looking \cs{use:n} is
 %   \begin{verbatim}
 %     <argument> \LaTeX3 error:
 %                               The error message.
 %   \end{verbatim}
 %   In other words, \TeX{} is processing the argument of \cs{use:n},
-%   which is \cs{LaTeX3 error:} \meta{error message}.
+%   which is \cs[module = {}]{LaTeX3 error:} \meta{error message}.
 %   Then \cs{@@_expandable_error:w} cleans up. In fact, there
 %   is an extra subtlety: if the user inserts tokens for error recovery,
 %   they should be kept. Thus we also use an odd space character
-- 
cgit v1.2.3

