gbranden pushed a commit to branch master
in repository groff.
commit 1470b664e73d3f7960f8b219de768961bbb62626
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Jul 12 06:38:49 2026 -0500
[troff]: Improve diagnostic message.
* src/roff/troff/input.cpp (transparent_translate): Improve diagnostic
message when griping about nonexistent special character with a
neutral apostrophe in its identifier.
---
ChangeLog | 6 ++++++
src/roff/troff/input.cpp | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b6c334db5..600201695 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-07-12 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (transparent_translate): Improve
+ diagnostic message when griping about nonexistent special
+ character with a neutral apostrophe in its identifier.
+
2026-07-12 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp (remove_character_request): Stop
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 7e954662a..8ccdd85be 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -3542,9 +3542,12 @@ static int transparent_translate(int cc)
unsigned char c = ci->get_ascii_code();
if (c != 0U)
return c;
- error("cannot translate %1 to special character '%2' in"
+ char quote = '\'';
+ if (ci->nm.contains(quote))
+ quote = '"';
+ error("cannot translate %1 to special character %2%3%2 in"
" device-independent output", input_char_description(cc),
- ci->nm.contents());
+ quote, ci->nm.contents());
}
}
return cc;
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit