gbranden pushed a commit to branch master
in repository groff.
commit 100616d9ebb395963a579332da63f5b3e0135bcc
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Aug 19 13:26:22 2024 -0500
[troff]: Tweak delimiter diagnostic messages.
* src/roff/troff/input.cpp (token::is_usable_as_delimiter): Generalize
diagnostics. Anything that's invalid as a "starting" delimiter is
invalid as an ending one, too. Also our terminology has been poorly
paired; we say "closing" delimiter but not "opening" for its
counterpart. This fixes that.
---
ChangeLog | 8 ++++++++
man/groff.7.man | 2 +-
src/roff/troff/input.cpp | 6 +++---
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 12e60458a..8b46eaad4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-08-19 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (token::is_usable_as_delimiter):
+ Generalize diagnostics. Anything that's invalid as a "starting"
+ delimiter is invalid as an ending one, too. Also our
+ terminology has been poorly paired; we say "closing" delimiter
+ but not "opening" for its counterpart. This fixes that.
+
2024-08-19 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp (token::is_usable_as_delimiter):
diff --git a/man/groff.7.man b/man/groff.7.man
index d2fcd4375..4c66acff1 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -2238,7 +2238,7 @@ includes all characters up to the end of the input line
(which may be continued with
.BI \[rs] newline\c
),
-to the ending delimiter for the escape sequence,
+to the closing delimiter for the escape sequence,
or within
.esc {
and
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 219576d89..b9efd2a65 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -2572,13 +2572,13 @@ bool token::is_usable_as_delimiter(bool report_error)
case TOKEN_CHAR:
is_valid = is_char_usable_as_delimiter(c);
if (!is_valid && report_error)
- error("character '%1' is not allowed as a starting delimiter",
+ error("character '%1' is not allowed as a delimiter",
static_cast<char>(c));
return is_valid;
case TOKEN_NODE:
// the user doesn't know what a node is
if (report_error)
- error("missing argument or invalid starting delimiter");
+ error("missing argument or invalid delimiter");
return false;
case TOKEN_SPACE:
case TOKEN_STRETCHABLE_SPACE:
@@ -2588,7 +2588,7 @@ bool token::is_usable_as_delimiter(bool report_error)
case TOKEN_NEWLINE:
case TOKEN_EOF:
if (report_error)
- error("%1 is not allowed as a starting delimiter", description());
+ error("%1 is not allowed as a delimiter", description());
return false;
default:
return true;
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit