gbranden pushed a commit to branch master
in repository groff.
commit 835a488e1d1366df9da11c38df63c136c490964e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Aug 23 00:37:11 2024 -0500
src/roff/troff/input.cpp: Clarify `chop` diag.
* src/roff/troff/input.cpp (chop_macro): Clarify diagnostic. Say
whether the argument being operated on is a "diversion" or a "macro or
string", rather then the vague term "object", which is otherwise
little-used in *roff discussions.
---
ChangeLog | 7 +++++++
src/roff/troff/input.cpp | 4 +++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index fba9e35d2..c42f92647 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-23 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (chop_macro): Clarify diagnostic.
+ Say whether the argument being operated on is a "diversion" or a
+ "macro or string", rather then the vague term "object", which is
+ otherwise little-used in *roff discussions.
+
2024-08-23 G. Branden Robinson <[email protected]>
[troff]: Trivially refactor. Boolify `macro` class, renaming
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index c5096e05a..8c82da4a1 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -4925,7 +4925,9 @@ void chop_macro()
if (!m)
error("cannot chop request '%1'", s.contents());
else if (m->is_empty())
- error("cannot chop empty object '%1'", s.contents());
+ error("cannot chop empty %1 '%2'",
+ (m->is_diversion() ? "diversion" : "macro or string"),
+ s.contents());
else {
int have_restore = 0;
// We have to check for additional save/restore pairs which could
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit