gbranden pushed a commit to branch master
in repository groff.
commit 99a00d06c48c84d9f2eceeadfd0978f2028d733b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Oct 31 21:15:55 2026 -0500
[troff]: Improve `ftr` error diagnostics.
* src/roff/troff/node.cpp (translate_font_request): Distinguish and
improve error diagnostics thrown when user attempts to employ a font
mounting position as either request argument.
---
ChangeLog | 6 ++++++
src/roff/troff/node.cpp | 9 +++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 46a3ee04d..26778f284 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-10-31 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/node.cpp (translate_font_request): Distinguish
+ and improve error diagnostics thrown when user attempts to
+ employ a font mounting position as either request argument.
+
2026-10-31 G. Branden Robinson <[email protected]>
* tmac/an-ext.tmac (SY): Configure hyphenation mode via `mY`
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index a75396918..97bd48fee 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -6831,7 +6831,9 @@ static void translate_font_request() // .ftr
return;
}
if (is_nonnegative_integer(from.contents())) {
- error("cannot translate a font mounting position");
+ error("font translation request"
+ " cannot map a mounting position (%1);"
+ " use font mounting request", from.contents());
skip_line();
return;
}
@@ -6842,7 +6844,10 @@ static void translate_font_request() // .ftr
return;
}
if (is_nonnegative_integer(to.contents())) {
- error("cannot translate to a font mounting position");
+ error("font translation request"
+ " cannot map a font name (\"%1\")"
+ " to a mounting position (%2);"
+ " use font mounting request", from.contents(), to.contents());
skip_line();
return;
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit