[latex3-commits] [git/LaTeX3-latex3-latex2e] TL21-2-kernel-msgs: shorten msg labels (ffdbfb18)
Frank Mittelbach
frank.mittelbach at latex-project.org
Mon Jun 7 19:43:58 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : TL21-2-kernel-msgs
Link : https://github.com/latex3/latex2e/commit/ffdbfb180524c2c974ebc85c593cf8d9ba23ff40
>---------------------------------------------------------------
commit ffdbfb180524c2c974ebc85c593cf8d9ba23ff40
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Mon Jun 7 19:43:58 2021 +0200
shorten msg labels
>---------------------------------------------------------------
ffdbfb180524c2c974ebc85c593cf8d9ba23ff40
base/ltcmd.dtx | 80 ++++++++++++++++----------------
base/testfiles-ltcmd/ltcmd001.tlg | 12 ++---
base/testfiles-ltcmd/ltcmd004.luatex.tlg | 4 +-
base/testfiles-ltcmd/ltcmd004.tlg | 4 +-
base/testfiles-ltcmd/ltcmd005.luatex.tlg | 8 ++--
base/testfiles-ltcmd/ltcmd005.tlg | 8 ++--
6 files changed, 58 insertions(+), 58 deletions(-)
diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx
index 6c28f9e9..126e2712 100644
--- a/base/ltcmd.dtx
+++ b/base/ltcmd.dtx
@@ -366,7 +366,7 @@
{
\cs_if_exist:NTF #1
{
- \msg_info:nnxx { cmd } { redefine-command }
+ \msg_info:nnxx { cmd } { redefine }
{ \token_to_str:N #1 } { \tl_to_str:n {#2} }
}
{
@@ -536,11 +536,11 @@
{ \tl_trim_spaces:o { \l_@@_environment_str } }
\cs_if_exist:cTF { \l_@@_environment_str }
{
- \msg_info:nnxx { cmd } { redefine-environment }
+ \msg_info:nnxx { cmd } { redefine-env }
{ \l_@@_environment_str } { \tl_to_str:n {#2} }
}
{
- \msg_info:nnxx { cmd } { define-environment }
+ \msg_info:nnxx { cmd } { define-env }
{ \l_@@_environment_str } { \tl_to_str:n {#2} }
}
\bool_set_false:N \l_@@_expandable_bool
@@ -693,7 +693,7 @@
}
\cs_new_protected:Npn \@@_defaults_error:w \q_recursion_stop
{
- \msg_error:nnx { cmd } { loop-in-defaults }
+ \msg_error:nnx { cmd } { default-loop }
{ \@@_environment_or_command: }
}
% \end{macrocode}
@@ -821,7 +821,7 @@
\@@_end_expandable_defaults:nnnNNn {#1} { } {#1} #2#3
{ } { } { } { } { } { } { } { } { } { }
{
- \msg_expandable_error:nnf { cmd } { loop-in-defaults }
+ \msg_expandable_error:nnf { cmd } { default-loop }
{ \exp_args:Nf \tl_trim_spaces:n { \token_to_str:N #4 } }
\use_iv:nnnn
}
@@ -919,7 +919,7 @@
\q_recursion_tail \q_recursion_tail \q_recursion_tail \q_recursion_stop
\int_compare:nNnT \l_@@_current_arg_int > 9
{
- \msg_error:nnxx { cmd } { too-many-arguments }
+ \msg_error:nnxx { cmd } { too-many-args }
{ \@@_environment_or_command: } { \tl_to_str:n {#1} }
\@@_bad_def:wn
}
@@ -951,7 +951,7 @@
{ \str_if_eq_p:nn {#1} { u } }
}
{
- \msg_error:nnxx { cmd } { xparse-argument-type }
+ \msg_error:nnxx { cmd } { xparse-arg-type }
{ \@@_environment_or_command: } { \tl_to_str:n {#1} }
}
{
@@ -1241,7 +1241,7 @@
{ \use_none:n }
}
{
- \msg_error:nnxxx { cmd } { forbidden-implicit-group-token }
+ \msg_error:nnxxx { cmd } { forbidden-group-token }
{ \@@_environment_or_command: } { \tl_to_str:n {#1} }
{
\token_if_eq_meaning:NNTF #1 \c_group_begin_token
@@ -1261,7 +1261,7 @@
{
\bool_if:NT \l_@@_expandable_bool
{
- \msg_error:nnxx { cmd } { invalid-expandable-argument-type }
+ \msg_error:nnxx { cmd } { invalid-expandable-arg }
{ \iow_char:N \\ \l_@@_function_tl } { \tl_to_str:n {#1} }
\@@_bad_def:wn
}
@@ -1334,7 +1334,7 @@
{
\bool_if:NT \l_@@_expandable_bool
{
- \msg_error:nnx { cmd } { inconsistent-long }
+ \msg_error:nnx { cmd } { long-short-mix }
{ \iow_char:N \\ \l_@@_function_tl }
\@@_bad_def:wn
}
@@ -1356,7 +1356,7 @@
{
\bool_if:NT \l_@@_some_obey_spaces_bool
{
- \msg_error:nnxx { cmd } { non-trailing-obey-spaces }
+ \msg_error:nnxx { cmd } { invalid-bang }
{ \@@_environment_or_command: } { \tl_to_str:n {#1} }
\@@_bad_def:wn
}
@@ -2587,7 +2587,7 @@
\exp_after:wN \exp_after:wN \exp_after:wN
\peek_meaning_remove:NTF \char_generate:nn { \tex_endlinechar:D } { 6 }
{
- \msg_error:nnxxx { cmd } { verbatim-newline }
+ \msg_error:nnxxx { cmd } { verbatim-nl }
{ \@@_environment_or_command: }
{ \tl_to_str:N \l_@@_v_arg_tl }
{ \tl_to_str:n {#1} }
@@ -3519,29 +3519,29 @@
one~or~more~mandatory~parts~are~missing.
\c_@@_ignore_def_tl
}
-\msg_new:nnnn { cmd } { command-already-defined }
- { Command~'#1'~already~defined! }
+\msg_new:nnnn { cmd } { already-defined }
+ { Command~'#1'~already~defined. }
{
You~have~used~#2~
with~a~command~that~already~has~a~definition. \\ \\
The~existing~definition~of~'#1'~will~not~be~altered.
}
-\msg_new:nnnn { cmd } { command-undefined }
- { Command ~'#1'~undefined! }
+\msg_new:nnnn { cmd } { undefined }
+ { Command ~'#1'~undefined. }
{
You~have~used~#2~
with~a~command~that~was~never~defined.
\c_@@_ignore_def_tl
}
-\msg_new:nnnn { cmd } { environment-already-defined }
- { Environment~'#1'~already~defined! }
+\msg_new:nnnn { cmd } { env-already-defined }
+ { Environment~'#1'~already~defined. }
{
You~have~used~\NewDocumentEnvironment
with~an~environment~that~already~has~a~definition. \\ \\
The~existing~definition~of~'#1'~will~not~be~altered.
}
-\msg_new:nnnn { cmd } { environment-undefined }
- { Environment~'#1'~undefined! }
+\msg_new:nnnn { cmd } { env-undefined }
+ { Environment~'#1'~undefined. }
{
You~have~used~\RenewDocumentEnvironment
with~an~environment~that~was~never~defined.
@@ -3554,7 +3554,7 @@
(or~no~arguments~at~all).~You~cannot~have~a~terminal~optional~
argument~with~expandable~commands.
}
-\msg_new:nnnn { cmd } { inconsistent-long }
+\msg_new:nnnn { cmd } { long-short-mix }
% { Inconsistent~long~arguments~for~expandable~command~'#1'. }
{ Invalid~argument~prefix~'+'~in~command~'#1'. }
{
@@ -3570,7 +3570,7 @@
\\ \\
LaTeX~will~ignore~the~entire~definition.
}
-\msg_new:nnnn { cmd } { invalid-expandable-argument-type }
+\msg_new:nnnn { cmd } { invalid-expandable-arg }
{ Invalid~argument~type~'#2'~in~#1. }
{
The~letter~'#2'~specifies~an~argument~type~which~cannot~be~used~
@@ -3588,7 +3588,7 @@
in~an~expandable~command~after~an~optional~argument.
\c_@@_ignore_def_tl
}
-\msg_new:nnnn { cmd } { non-trailing-obey-spaces }
+\msg_new:nnnn { cmd } { invalid-bang }
% { Prefix~'!'~used~before~mandatory~argument~'#2'~of~#1. }
{ Invalid~argument~prefix~'!'~in~#1. }
{
@@ -3621,7 +3621,7 @@
where~a~single~token~is~required.
\c_@@_ignore_def_tl
}
-\msg_new:nnnn { cmd } { forbidden-implicit-group-token }
+\msg_new:nnnn { cmd } { forbidden-group-token }
{ Argument~delimiter~'#2'~invalid~in~#1. }
{
The~argument~specification~contains~the~implicit~
@@ -3636,7 +3636,7 @@
This~is~only~supported~for~robust~commands,~but~not~for~expandable~ones.
\c_@@_ignore_def_tl
}
-\msg_new:nnnn { cmd } { too-many-arguments }
+\msg_new:nnnn { cmd } { too-many-args }
{ Too~many~arguments~for~#1. }
{
The~argument~specification~'#2'~asks~for~more~than~9~arguments.~
@@ -3650,13 +3650,13 @@
The~argument~specification~provided~for~#1~has~two~'#2'~markers~applied~
to~the~same~argument;~one~is~redundant.
}
-\msg_new:nnnn { cmd } { unknown-argument-type }
+\msg_new:nnnn { cmd } { unknown-argument-type } % should be unkown-arg-type but dep in xparse
{ Invalid~argument~type~'#2'~in~#1. }
{
The~letter~'#2'~does~not~specify~a~known~argument~type.
\c_@@_ignore_def_tl
}
-\msg_new:nnnn { cmd } { xparse-argument-type }
+\msg_new:nnnn { cmd } { xparse-arg-type }
{ Invalid~argument~type~'#2'~in~#1~(requires~xparse). }
{
The~letter~'#2'~specifies~a~known~but~deprecated~argument~type.~
@@ -3667,13 +3667,13 @@
%
% Errors when using commands/environments. The \texttt{if-boolean}
% message is always used in expandable errors. The
-% \texttt{loop-in-defaults} and \texttt{missing-required} messages can
+% \texttt{default-loop} and \texttt{missing-required} messages can
% be expandable or not expandable.
% \begin{macrocode}
\msg_new:nnn { cmd } { if-boolean }
% { Invalid~use~\iow_char:N\\IfBooleanTF{#1}... }
{ Invalid~argument~{#1}~to~\iow_char:N\\IfBoolean... }
-\msg_new:nnnn { cmd } { loop-in-defaults }
+\msg_new:nnnn { cmd } { default-loop }
{ Circular~dependency~in~defaults~of~#1. }
{
The~default~values~of~two~or~more~arguments~of~the~#1~
@@ -3707,7 +3707,7 @@
You~have~asked~for~the~argument~specification~for~the~#1,~
but~it~is~not~defined.
}
-\msg_new:nnnn { cmd } { verbatim-newline }
+\msg_new:nnnn { cmd } { verbatim-nl }
{ Verbatim-like~#1~ended~by~end~of~line. }
{
The~verbatim~argument~of~the~#1~cannot~contain~more~than~one~line,~
@@ -3732,22 +3732,22 @@
%
% Intended more for information.
% \begin{macrocode}
-\msg_new:nnn { cmd } { define-command }
+\msg_new:nnn { cmd } { define-command } % should be just ``define'' but dep in xparse
{
Defining~command~#1~
with~sig.~'#2'~\msg_line_context:.
}
-\msg_new:nnn { cmd } { define-environment }
+\msg_new:nnn { cmd } { define-env }
{
Defining~environment~'#1'~
with~sig.~'#2'~\msg_line_context:.
}
-\msg_new:nnn { cmd } { redefine-command }
+\msg_new:nnn { cmd } { redefine }
{
Redefining~command~#1~
with~sig.~'#2'~\msg_line_context:.
}
-\msg_new:nnn { cmd } { redefine-environment }
+\msg_new:nnn { cmd } { redefine-env }
{
Redefining~environment~'#1'~
with~sig.~'#2'~\msg_line_context:.
@@ -3802,7 +3802,7 @@
{
\cs_if_exist:NTF #1
{
- \msg_error:nnxx { cmd } { command-already-defined }
+ \msg_error:nnxx { cmd } { already-defined }
{ \use:nnn \token_to_str:N #1 { } }
{ \token_to_str:N \NewDocumentCommand }
}
@@ -3816,7 +3816,7 @@
\cs_if_exist:NTF #1
{ \@@_declare_cmd:Nnn #1 {#2} {#3} }
{
- \msg_error:nnxx { cmd } { command-undefined }
+ \msg_error:nnxx { cmd } { undefined }
{ \use:nnn \token_to_str:N #1 { } }
{ \token_to_str:N \RenewDocumentCommand }
}
@@ -3847,14 +3847,14 @@
\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
{
\cs_if_exist:cTF {#1}
- { \msg_error:nnx { cmd } { environment-already-defined } {#1} }
+ { \msg_error:nnx { cmd } { env-already-defined } {#1} }
{ \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
}
\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
{
\cs_if_exist:cTF {#1}
{ \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
- { \msg_error:nnx { cmd } { environment-undefined } {#1} }
+ { \msg_error:nnx { cmd } { env-undefined } {#1} }
}
\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
{ \cs_if_exist:cF {#1} { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } }
@@ -3881,7 +3881,7 @@
{
\cs_if_exist:NTF #1
{
- \msg_error:nnxx { cmd } { command-already-defined }
+ \msg_error:nnxx { cmd } { already-defined }
{ \use:nnn \token_to_str:N #1 { } }
{ \token_to_str:N \NewExpandableDocumentCommand }
}
@@ -3895,7 +3895,7 @@
\cs_if_exist:NTF #1
{ \@@_declare_expandable_cmd:Nnn #1 {#2} {#3} }
{
- \msg_error:nnxx { cmd } { command-undefined }
+ \msg_error:nnxx { cmd } { undefined }
{ \use:nnn \token_to_str:N #1 { } }
{ \token_to_str:N \RenewExpandableDocumentCommand }
}
diff --git a/base/testfiles-ltcmd/ltcmd001.tlg b/base/testfiles-ltcmd/ltcmd001.tlg
index 7486e105..8f4614ea 100644
--- a/base/testfiles-ltcmd/ltcmd001.tlg
+++ b/base/testfiles-ltcmd/ltcmd001.tlg
@@ -4,14 +4,14 @@ Author: Joseph Wright, Frank Mittelbach, Bruno Le Floch
============================================================
TEST 1: Checking for existing definitions
============================================================
-! LaTeX cmd Error: Command '\foo' already defined!
+! LaTeX cmd Error: Command '\foo' already defined.
For immediate help type H <return>.
...
l. ...}
You have used \NewDocumentCommand with a command that already has a
definition.
The existing definition of '\foo' will not be altered.
-! LaTeX cmd Error: Command '\foo' undefined!
+! LaTeX cmd Error: Command '\foo' undefined.
For immediate help type H <return>.
...
l. ...}
@@ -454,14 +454,14 @@ l. ...}
============================================================
TEST 10: Checking for existing environments
============================================================
-! LaTeX cmd Error: Environment 'foo' already defined!
+! LaTeX cmd Error: Environment 'foo' already defined.
For immediate help type H <return>.
...
l. ...}
You have used \NewDocumentEnvironment with an environment that already has a
definition.
The existing definition of 'foo' will not be altered.
-! LaTeX cmd Error: Environment 'foo' undefined!
+! LaTeX cmd Error: Environment 'foo' undefined.
For immediate help type H <return>.
...
l. ...}
@@ -715,14 +715,14 @@ not appear between \csname and \endcsname.
============================================================
TEST 18: Checking for existing expandable definitions
============================================================
-! LaTeX cmd Error: Command '\foo' already defined!
+! LaTeX cmd Error: Command '\foo' already defined.
For immediate help type H <return>.
...
l. ...}
You have used \NewExpandableDocumentCommand with a command that already has a
definition.
The existing definition of '\foo' will not be altered.
-! LaTeX cmd Error: Command '\foo' undefined!
+! LaTeX cmd Error: Command '\foo' undefined.
For immediate help type H <return>.
...
l. ...}
diff --git a/base/testfiles-ltcmd/ltcmd004.luatex.tlg b/base/testfiles-ltcmd/ltcmd004.luatex.tlg
index 5865a2b3..0f769714 100644
--- a/base/testfiles-ltcmd/ltcmd004.luatex.tlg
+++ b/base/testfiles-ltcmd/ltcmd004.luatex.tlg
@@ -491,14 +491,14 @@ The first argument of '\ShowDocumentCommandArgSpec' should be the document
command that will be defined. The provided argument '##' is a character.
Perhaps a backslash is missing?
LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Command '\?' already defined!
+! LaTeX cmd Error: Command '\?' already defined.
For immediate help type H <return>.
...
l. ... }
You have used \NewDocumentCommand with a command that already has a
definition.
The existing definition of '\?' will not be altered.
-! LaTeX cmd Error: Command '\?' already defined!
+! LaTeX cmd Error: Command '\?' already defined.
For immediate help type H <return>.
...
l. ... }
diff --git a/base/testfiles-ltcmd/ltcmd004.tlg b/base/testfiles-ltcmd/ltcmd004.tlg
index 958bc2f5..e6b6914e 100644
--- a/base/testfiles-ltcmd/ltcmd004.tlg
+++ b/base/testfiles-ltcmd/ltcmd004.tlg
@@ -491,14 +491,14 @@ The first argument of '\ShowDocumentCommandArgSpec' should be the document
command that will be defined. The provided argument '##' is a character.
Perhaps a backslash is missing?
LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Command '\?' already defined!
+! LaTeX cmd Error: Command '\?' already defined.
For immediate help type H <return>.
...
l. ... }
You have used \NewDocumentCommand with a command that already has a
definition.
The existing definition of '\?' will not be altered.
-! LaTeX cmd Error: Command '\?' already defined!
+! LaTeX cmd Error: Command '\?' already defined.
For immediate help type H <return>.
...
l. ... }
diff --git a/base/testfiles-ltcmd/ltcmd005.luatex.tlg b/base/testfiles-ltcmd/ltcmd005.luatex.tlg
index 72cc185c..4454a618 100644
--- a/base/testfiles-ltcmd/ltcmd005.luatex.tlg
+++ b/base/testfiles-ltcmd/ltcmd005.luatex.tlg
@@ -228,7 +228,7 @@ LaTeX will ignore this entire definition.
============================================================
TEST 7: Already or not yet defined
============================================================
-! LaTeX cmd Error: Command '\space' already defined!
+! LaTeX cmd Error: Command '\space' already defined.
For immediate help type H <return>.
...
l. ... }
@@ -236,7 +236,7 @@ You have used \NewDocumentCommand with a command that already has a
definition.
The existing definition of '\space' will not be altered.
|macro:-> |
-! LaTeX cmd Error: Environment 'foo' already defined!
+! LaTeX cmd Error: Environment 'foo' already defined.
For immediate help type H <return>.
...
l. ... }
@@ -244,13 +244,13 @@ You have used \NewDocumentEnvironment with an environment that already has a
definition.
The existing definition of 'foo' will not be altered.
foo
-! LaTeX cmd Error: Command '\testA' undefined!
+! LaTeX cmd Error: Command '\testA' undefined.
For immediate help type H <return>.
...
l. ... }
You have used \RenewDocumentCommand with a command that was never defined.
LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Environment 'testA' undefined!
+! LaTeX cmd Error: Environment 'testA' undefined.
For immediate help type H <return>.
...
l. ... }
diff --git a/base/testfiles-ltcmd/ltcmd005.tlg b/base/testfiles-ltcmd/ltcmd005.tlg
index f8ccd854..069fa150 100644
--- a/base/testfiles-ltcmd/ltcmd005.tlg
+++ b/base/testfiles-ltcmd/ltcmd005.tlg
@@ -228,7 +228,7 @@ LaTeX will ignore this entire definition.
============================================================
TEST 7: Already or not yet defined
============================================================
-! LaTeX cmd Error: Command '\space' already defined!
+! LaTeX cmd Error: Command '\space' already defined.
For immediate help type H <return>.
...
l. ... }
@@ -236,7 +236,7 @@ You have used \NewDocumentCommand with a command that already has a
definition.
The existing definition of '\space' will not be altered.
|macro:-> |
-! LaTeX cmd Error: Environment 'foo' already defined!
+! LaTeX cmd Error: Environment 'foo' already defined.
For immediate help type H <return>.
...
l. ... }
@@ -244,13 +244,13 @@ You have used \NewDocumentEnvironment with an environment that already has a
definition.
The existing definition of 'foo' will not be altered.
foo
-! LaTeX cmd Error: Command '\testA' undefined!
+! LaTeX cmd Error: Command '\testA' undefined.
For immediate help type H <return>.
...
l. ... }
You have used \RenewDocumentCommand with a command that was never defined.
LaTeX will ignore this entire definition.
-! LaTeX cmd Error: Environment 'testA' undefined!
+! LaTeX cmd Error: Environment 'testA' undefined.
For immediate help type H <return>.
...
l. ... }
More information about the latex3-commits
mailing list.