gbranden pushed a commit to branch master
in repository groff.
commit f610d917a554b33cd655ce02f533c544616c168d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jun 24 03:05:30 2026 -0500
[eqn]: Improve excess macro argument warning.
* src/preproc/eqn/lex.cpp (interpolate_macro_with_args): When warning of
ignored excess macro arguments, report how many are supported.
---
ChangeLog | 6 ++++++
src/preproc/eqn/lex.cpp | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index b112f4feb..27f0f7128 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-06-24 G. Branden Robinson <[email protected]>
+
+ * src/preproc/eqn/lex.cpp (interpolate_macro_with_args): When
+ warning of ignored excess macro arguments, report how many are
+ supported.
+
2026-06-23 G. Branden Robinson <[email protected]>
* src/preproc/eqn/lex.cpp: Slightly refactor. Replace magic
diff --git a/src/preproc/eqn/lex.cpp b/src/preproc/eqn/lex.cpp
index c206de5fa..e14a49d04 100644
--- a/src/preproc/eqn/lex.cpp
+++ b/src/preproc/eqn/lex.cpp
@@ -778,7 +778,9 @@ static void interpolate_macro_with_args(const char *body)
if ((0 == level) && ((',' == c) || (')' == c))) {
if (argc >= eqn_macro_maximum_arg_count) {
if (!is_ignoring_arguments) { // if we didn't already warn
- lex_warning("excess macro argument(s); ignoring");
+ lex_warning("eqn supports at most %1 macro arguments;"
+ " ignoring excess",
+ eqn_macro_maximum_arg_count);
is_ignoring_arguments = true;
}
break;
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit