gbranden pushed a commit to branch master
in repository groff.
commit f5fe7706c10a98e50fc24e521ed51457abbcc642
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Dec 7 20:29:54 2025 -0600
[troff]: Update wording of warning diagnostic.
* src/roff/troff/input.cpp (read_delimited_identifier): Update
diagnostic wording to reflect function's generality, making its issue
in the case of, say, `\C\h'1m'foobar\h'1m'` more truthful.
Illustration:
$ printf '\\C\\h"1m"foobar\\h"1m"\n' | ~/groff-HEAD/bin/groff -w delim -z
troff:<standard input>:1: warning: cannot use a horizontal motion to
delimit a name
$ printf '\\C\\h"1m"foobar\\h"1m"\n' | ./build/test-groff -w delim -z
troff:<standard input>:1: warning: cannot use a horizontal motion to
delimit an identifier
---
ChangeLog | 6 ++++++
src/roff/troff/input.cpp | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index fe2454b6d..bd6957333 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-12-07 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (read_delimited_identifier): Update
+ diagnostic wording to reflect function's generality, making its
+ issue in the case of, say, `\C\h'1m'foobar\h'1m'` more truthful.
+
2025-12-07 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp: Trivially refactor. Rename
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 4a7a07a19..be424bb28 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -6183,7 +6183,7 @@ static symbol read_delimited_identifier()
DELIMITER_ATT_STRING_EXPRESSION))
is_valid = true;
if (!is_valid) {
- warning(WARN_DELIM, "cannot use %1 to delimit a name",
+ warning(WARN_DELIM, "cannot use %1 to delimit an identifier",
start_token.description());
return NULL_SYMBOL;
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit