[latex3-commits] [git/LaTeX3-latex3-latex2e] TL21-2-kernel-msgs: Normalizing argument type errors (5abdd6a9)

Frank Mittelbach frank.mittelbach at latex-project.org
Sat Jun 5 15:28:16 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : TL21-2-kernel-msgs
Link       : https://github.com/latex3/latex2e/commit/5abdd6a9913462e7471d9bd5469d7e750bc89903

>---------------------------------------------------------------

commit 5abdd6a9913462e7471d9bd5469d7e750bc89903
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sat Jun 5 15:28:16 2021 +0200

    Normalizing  argument type errors


>---------------------------------------------------------------

5abdd6a9913462e7471d9bd5469d7e750bc89903
 base/ltcmd.dtx                           | 21 +++++++++------------
 base/testfiles-ltcmd/ltcmd001.tlg        |  4 ++--
 base/testfiles-ltcmd/ltcmd004.luatex.tlg |  2 +-
 base/testfiles-ltcmd/ltcmd004.tlg        |  2 +-
 base/testfiles-ltcmd/ltcmd005.luatex.tlg | 16 ++++++++--------
 base/testfiles-ltcmd/ltcmd005.tlg        | 16 ++++++++--------
 base/testfiles-ltcmd/ltcmd006.tlg        | 32 ++++++++++++++++----------------
 7 files changed, 45 insertions(+), 48 deletions(-)

diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index a4f4b910..60740e2e 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -3564,25 +3564,22 @@
     arguments~after~long~arguments.~You~have~tried~to~mix~the~two~types.
   }
 \msg_new:nnnn { cmd } { invalid-command-arg }
-  { Argument~type~'#2'~not~available~for~#1. }
+  { Invalid~argument~type~'#2'~in~#1~definition. }
   {
     The~letter~'#2'~can~only~be~used~in~environment~argument~
-    specifications,~not~for~commands.
+    specifications,~but~not~for~commands.
     \\ \\
-    LaTeX~will~ignore~this~entire~definition.
+    LaTeX~will~ignore~the~entire~definition.
   }
 \msg_new:nnnn { cmd } { invalid-expandable-argument-type }
-  { Argument~type~'#2'~not~available~for~expandable~command~'#1'. }
+  { Invalid~argument~type~'#2'~in~#1~definition. }
   {
     The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
     in~an~expandable~command.
     \c_@@_ignore_def_tl
   }
 \msg_new:nnnn { cmd } { invalid-after-optional-expandably }
-  {
-    Argument~type~'#2'~not~available~after~optional~argument~
-    for~expandable~command~'#1'.
-  }
+  { Invalid~argument~type~'#2'~in~#1~definition. }
   {
     The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
     in~an~expandable~command~after~an~optional~argument.
@@ -3648,16 +3645,16 @@
     to~the~same~argument;~these~are~redundant.
   }
 \msg_new:nnnn { cmd } { unknown-argument-type }
-  { Unknown~argument~type~'#2'~for~the~#1. }
+  { Invalid~argument~type~'#2'~in~#1~definition. }
   {
     The~letter~'#2'~does~not~specify~a~known~argument~type.
     \c_@@_ignore_def_tl
   }
 \msg_new:nnnn { cmd } { xparse-argument-type }
-  { Deprecated~argument~type~'#2'~for~the~#1~requires~xparse. }
+  { Invalid~argument~type~'#2'~in~#1~definition~(requires~xparse). }
   {
-    The~letter~'#2'~specifies~a~known~argument~type~that~requires~
-    the~xparse~package.
+    The~letter~'#2'~specifies~a~known~but~deprecated~argument~type.~
+    If~you~really~need~it~you~have~to~load~the~xparse~package.
     \c_@@_ignore_def_tl
   }
 %    \end{macrocode}
diff --git a/base/testfiles-ltcmd/ltcmd001.tlg b/base/testfiles-ltcmd/ltcmd001.tlg
index daea14e6..b6f34232 100644
--- a/base/testfiles-ltcmd/ltcmd001.tlg
+++ b/base/testfiles-ltcmd/ltcmd001.tlg
@@ -322,7 +322,7 @@ l. ...}
 ============================================================
 TEST 7: Unknown argument types
 ============================================================
-! LaTeX cmd Error: Unknown argument type 'n' for the command '\foo'.
+! LaTeX cmd Error: Invalid argument type 'n' in command '\foo' definition.
 For immediate help type H <return>.
  ...                                              
 l. ...}
@@ -334,7 +334,7 @@ l. ...}
 > \foo code=undefined.
 <recently read> }
 l. ...}
-! LaTeX cmd Error: Unknown argument type 'a' for the command '\foo'.
+! LaTeX cmd Error: Invalid argument type 'a' in command '\foo' definition.
 For immediate help type H <return>.
  ...                                              
 l. ...}
diff --git a/base/testfiles-ltcmd/ltcmd004.luatex.tlg b/base/testfiles-ltcmd/ltcmd004.luatex.tlg
index 4684da47..939d61f7 100644
--- a/base/testfiles-ltcmd/ltcmd004.luatex.tlg
+++ b/base/testfiles-ltcmd/ltcmd004.luatex.tlg
@@ -581,7 +581,7 @@ and I'll forget about whatever was undefined.
 ============================================================
 TEST 15: Bad arguments
 ============================================================
-! LaTeX cmd Error: Unknown argument type 'abc' for the command '\foo'.
+! LaTeX cmd Error: Invalid argument type 'abc' in command '\foo' definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
diff --git a/base/testfiles-ltcmd/ltcmd004.tlg b/base/testfiles-ltcmd/ltcmd004.tlg
index a3e30398..7ed9755a 100644
--- a/base/testfiles-ltcmd/ltcmd004.tlg
+++ b/base/testfiles-ltcmd/ltcmd004.tlg
@@ -581,7 +581,7 @@ and I'll forget about whatever was undefined.
 ============================================================
 TEST 15: Bad arguments
 ============================================================
-! LaTeX cmd Error: Unknown argument type 'abc' for the command '\foo'.
+! LaTeX cmd Error: Invalid argument type 'abc' in command '\foo' definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
diff --git a/base/testfiles-ltcmd/ltcmd005.luatex.tlg b/base/testfiles-ltcmd/ltcmd005.luatex.tlg
index d7df4dc6..ef06801a 100644
--- a/base/testfiles-ltcmd/ltcmd005.luatex.tlg
+++ b/base/testfiles-ltcmd/ltcmd005.luatex.tlg
@@ -135,13 +135,13 @@ l. ...  }
 I suspect you've forgotten a `}', causing me to apply this
 control sequence to too much text. How can we recover?
 My plan is to forget the whole thing and hope for the best.
-! LaTeX cmd Error: Argument type 'b' not available for command '\testE'.
+! LaTeX cmd Error: Invalid argument type 'b' in command '\testE' definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
-The letter 'b' can only be used in environment argument specifications, not
-for commands.
-LaTeX will ignore this entire definition.
+The letter 'b' can only be used in environment argument specifications, but
+not for commands.
+LaTeX will ignore the entire definition.
 ! LaTeX cmd Error: In the definition of environment 'env3', b (body) argument
 (cmd)              must be last.
 For immediate help type H <return>.
@@ -220,13 +220,14 @@ For immediate help type H <return>.
 l. ...  }
 The argument specification provided has two markers '!' applying to the same
 argument; these are redundant.
-! LaTeX cmd Error: Unknown argument type 'X' for the command '\testA'.
+! LaTeX cmd Error: Invalid argument type 'X' in command '\testA' definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
 The letter 'X' does not specify a known argument type.
 LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Unknown argument type 'X' for the environment 'testA'.
+! LaTeX cmd Error: Invalid argument type 'X' in environment 'testA'
+(cmd)              definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
@@ -340,8 +341,7 @@ For immediate help type H <return>.
 l. ...  }
 The arguments for an expandable command must not involve short arguments after
 long arguments. You have tried to mix the two types.
-! LaTeX cmd Error: Argument type 'v' not available for expandable command
-(cmd)              '\testA'.
+! LaTeX cmd Error: Invalid argument type 'v' in \testA definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
diff --git a/base/testfiles-ltcmd/ltcmd005.tlg b/base/testfiles-ltcmd/ltcmd005.tlg
index 9b5eb87e..7ce255fd 100644
--- a/base/testfiles-ltcmd/ltcmd005.tlg
+++ b/base/testfiles-ltcmd/ltcmd005.tlg
@@ -135,13 +135,13 @@ l. ...  }
 I suspect you've forgotten a `}', causing me to apply this
 control sequence to too much text. How can we recover?
 My plan is to forget the whole thing and hope for the best.
-! LaTeX cmd Error: Argument type 'b' not available for command '\testE'.
+! LaTeX cmd Error: Invalid argument type 'b' in command '\testE' definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
-The letter 'b' can only be used in environment argument specifications, not
-for commands.
-LaTeX will ignore this entire definition.
+The letter 'b' can only be used in environment argument specifications, but
+not for commands.
+LaTeX will ignore the entire definition.
 ! LaTeX cmd Error: In the definition of environment 'env3', b (body) argument
 (cmd)              must be last.
 For immediate help type H <return>.
@@ -220,13 +220,14 @@ For immediate help type H <return>.
 l. ...  }
 The argument specification provided has two markers '!' applying to the same
 argument; these are redundant.
-! LaTeX cmd Error: Unknown argument type 'X' for the command '\testA'.
+! LaTeX cmd Error: Invalid argument type 'X' in command '\testA' definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
 The letter 'X' does not specify a known argument type.
 LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Unknown argument type 'X' for the environment 'testA'.
+! LaTeX cmd Error: Invalid argument type 'X' in environment 'testA'
+(cmd)              definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
@@ -340,8 +341,7 @@ For immediate help type H <return>.
 l. ...  }
 The arguments for an expandable command must not involve short arguments after
 long arguments. You have tried to mix the two types.
-! LaTeX cmd Error: Argument type 'v' not available for expandable command
-(cmd)              '\testA'.
+! LaTeX cmd Error: Invalid argument type 'v' in \testA definition.
 For immediate help type H <return>.
  ...                                              
 l. ...  }
diff --git a/base/testfiles-ltcmd/ltcmd006.tlg b/base/testfiles-ltcmd/ltcmd006.tlg
index 9577fa20..15e4f2e1 100644
--- a/base/testfiles-ltcmd/ltcmd006.tlg
+++ b/base/testfiles-ltcmd/ltcmd006.tlg
@@ -4,37 +4,37 @@ Author: PhelypeOleinik
 ============================================================
 TEST 1: Deprecated argument types
 ============================================================
-! LaTeX cmd Error: Deprecated argument type 'G' for the command '\testA'
-(cmd)              requires xparse.
+! LaTeX cmd Error: Invalid argument type 'G' in command '\testA' definition
+(cmd)              (requires xparse).
 For immediate help type H <return>.
  ...                                              
 l. ...  }
-The letter 'G' specifies a known argument type that requires the xparse
-package.
+The letter 'G' specifies a known but deprecated argument type. If you really
+need it you have to load the xparse package.
 LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Deprecated argument type 'g' for the command '\testA'
-(cmd)              requires xparse.
+! LaTeX cmd Error: Invalid argument type 'g' in command '\testA' definition
+(cmd)              (requires xparse).
 For immediate help type H <return>.
  ...                                              
 l. ...  }
-The letter 'g' specifies a known argument type that requires the xparse
-package.
+The letter 'g' specifies a known but deprecated argument type. If you really
+need it you have to load the xparse package.
 LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Deprecated argument type 'l' for the command '\testA'
-(cmd)              requires xparse.
+! LaTeX cmd Error: Invalid argument type 'l' in command '\testA' definition
+(cmd)              (requires xparse).
 For immediate help type H <return>.
  ...                                              
 l. ...  }
-The letter 'l' specifies a known argument type that requires the xparse
-package.
+The letter 'l' specifies a known but deprecated argument type. If you really
+need it you have to load the xparse package.
 LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Deprecated argument type 'u' for the command '\testA'
-(cmd)              requires xparse.
+! LaTeX cmd Error: Invalid argument type 'u' in command '\testA' definition
+(cmd)              (requires xparse).
 For immediate help type H <return>.
  ...                                              
 l. ...  }
-The letter 'u' specifies a known argument type that requires the xparse
-package.
+The letter 'u' specifies a known but deprecated argument type. If you really
+need it you have to load the xparse package.
 LaTeX will ignore this entire definition.
 ============================================================
 ============================================================





More information about the latex3-commits mailing list.