Update of bug #68206 (group groff):
Item Group: Incorrect behaviour => Warning/Suspicious
behaviour
Status: Confirmed => Invalid
Assigned to: None => gbranden
Open/Closed: Open => Closed
Summary: [troff] spurious 'delim' warning using \Z escape
sequence: "missing closing delimiter" => [troff] spurious(?) 'delim' warning
using \Z escape sequence: "missing closing delimiter"
_______________________________________________________
Follow-up Comment #2:
Ah!
I think the diagnostic is not spurious after all.
Notice that you're defining a **macro** called `a`, not a string.
Macros generally have newlines in them; strings cannot. Even a one-line macro
definition like yours has a newline at its end.
When you "pun" a macro with string interpolation, you get all its contents,
including the newline at the end of the definition, which gets interpolated
and prompts the warning.
Our documentation talks about this stuff. Our Texinfo manual and _groff_(7)
have a (sub)section called "Punning names".
Punning names
Macros, strings, and diversions share a name space; see section
“Identifiers” above. Internally, the same mechanism is used to
store them. You can thus call a macro with string interpolation
syntax and vice versa. Interpolating a string does not hide
existing macro arguments. Place the sequence \\ at the end of a
line in a macro definition or, within a macro definition,
immediately after the interpolation of a macro as a string, to
suppress the effect of a newline.
Given that, here are two ways to dispose of the warning.
$ diff -u ATTIC/68206{,a}.groff
--- ATTIC/68206.groff 2026-04-06 07:13:32.529597563 -0500
+++ ATTIC/68206a.groff 2026-04-06 07:30:28.774378070 -0500
@@ -1,6 +1,6 @@
.\" groff -z
.de a
-\\$*
+\\$*\\
..
.nr b \w'Deri '
\Z@\*[a Deri]@
$ diff -u ATTIC/68206{,b}.groff
--- ATTIC/68206.groff 2026-04-06 07:13:32.529597563 -0500
+++ ATTIC/68206b.groff 2026-04-06 07:30:58.814279908 -0500
@@ -2,6 +2,7 @@
.de a
\\$*
..
+.chop a
.nr b \w'Deri '
\Z@\*[a Deri]@
\h'\n[b]u'James
I believe the formatter is working as documented here.
Resolving as invalid. Unless someone has a convincing case against...
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68206>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
