gbranden pushed a commit to branch master
in repository groff.
commit f139b8b4b09cd18ae978dc76236b309c1041d3da
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Dec 8 11:02:36 2025 -0600
[doc,man]: Fix wrong claim about esc seqs in ids.
Our manual has been making incorrect claims about the portability of
escape sequences in identifiers for many years.
Document the awful truth in our Texinfo manual (only). This is such a
mess I'm dropping it from groff_diff(7) altogether. There's no
special "groff difference" here, just a world of troff chaos, with our
approach being the most sensible.
Illustration:
$ cat EXPERIMENTS/funky-identifiers.roff
.tm hello
.nr \0 1001
.nr \| 1002
.nr \^ 1003
.nr \& 1004
.nr \{ 1005
.nr \} 1006
.nr \ 1007
.nr \' 1008
.nr \` 1009
.nr \- 1010
.nr \_ 1011
.nr \! 1012
.nr \% 1013
.nr \c 1014
.tm registers set
.tm reg=\n\0
.tm reg=\n\|
.tm reg=\n\^
.tm reg=\n\&
.tm reg=\n\{
.tm reg=\n\}
.tm reg=\n\
.tm reg=\n\'
.tm reg=\n\`
.tm reg=\n\-
.tm reg=\n\_
.tm reg=\n\!
.tm reg=\n\%
.tm reg=\n\c
.tm goodbye
$ dwb troff -a EXPERIMENTS/funky-identifiers.roff
hello
registers set
reg=00
reg=0|
reg=0^
reg=\&
reg=
reg=
reg=\
reg=\
reg=
reg=
reg=1011
reg=
reg=\%
reg=
goodbye
$ 9 troff -a EXPERIMENTS/funky-identifiers.roff
hello
registers set
reg=00
reg=0|
reg=0^
reg=\&
reg=
reg=
reg=\
reg=1008
reg=1009
reg=1010
reg=1011
reg=
reg=\%
reg=
goodbye
$ troff -a ./funky-identifiers.roff # Solaris
hello
registers set
reg=00
reg=0|
reg=0^
reg=1004
reg=1005
reg=1006
reg=1007
reg=
reg=
reg=
reg=
reg=1012
reg=1013
reg=1014
goodbye
$ heirloom troff -a EXPERIMENTS/funky-identifiers.roff
hello
troff: motion terminates name; line 2, file
EXPERIMENTS/funky-identifiers.roff
troff: motion terminates name; line 3, file
EXPERIMENTS/funky-identifiers.roff
troff: motion terminates name; line 4, file
EXPERIMENTS/funky-identifiers.roff
registers set
reg=00
reg=0|
reg=0^
reg=0
reg=0
reg=0
reg=0
reg=
reg=
reg=
reg=
reg=1012
reg=0
reg=0
goodbye
---
doc/groff.texi.in | 101 ++++++++++++++++++++++++++++-----------------------
man/groff_diff.7.man | 25 -------------
2 files changed, 56 insertions(+), 70 deletions(-)
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 1b19fbec3..05abcb0ad 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -7169,10 +7169,62 @@ not qualify, so our first attempt elicited an error
diagnostic.
@section Identifiers
@cindex identifiers
-An @dfn{identifier} labels a GNU @code{troff} datum such as a register,
-name (macro, string, or diversion), typeface, color, special character
-or character class, hyphenation language code, environment, or stream.
-Valid identifiers consist of one or more ordinary characters.
+An
+@dfn{identifier}
+labels a
+GNU
+@command{troff} @c GNU
+datum such as a register,
+name
+(macro,
+string,
+or diversion),
+typeface,
+color,
+special character or character class,
+hyphenation language code,
+environment,
+or stream.
+Valid identifiers consist of one or more ordinary
+characters.@footnote{Use of escape sequences in identifiers
+is not portable.
+For example,
+DWB 3.3
+@command{troff} @c DWB
+accepts
+@code{\_}.
+Plan@tie{}9
+@command{troff} @c Plan 9
+does too,
+along with
+@code{\'},
+@code{\`},
+and
+@code{\-}.
+Solaris
+@command{troff} @c Solaris
+rejects all of these except
+@code{\_},
+but accepts
+@code{\&},
+@code{\@{},
+@code{\@}},
+@code{\SPC},
+@code{\%},
+and
+@code{\c}.
+Heirloom Doctools
+@command{troff} @c Heirloom Doctools
+rejects all of these,
+including
+@code{\_},
+but accepts
+@code{\!},
+which the others reject.
+GNU
+@command{troff} @c GNU
+rejects all of the foregoing.
+}
@cindex ordinary character
@cindex character, ordinary
An
@@ -20516,47 +20568,6 @@ features sometimes cause incompatibilities with
documents written
assuming old implementations of
@code{troff}. @c generic
-@cindex @code{\A}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\|}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\^}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\&}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\@{}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\@}}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\@key{SPC}}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\'}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\`}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\-}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\_}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\!}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\%}, incompatibilities with @acronym{AT&T} @code{troff}
-@cindex @code{\c}, incompatibilities with @acronym{AT&T} @code{troff}
-GNU
-@command{troff} @c GNU
-does not allow the use of the escape sequences
-@code{\|},
-@code{\^},
-@code{\&},
-@code{\@{},
-@code{\@}},
-@code{\@key{SPC}},
-@code{\'},
-@code{\`},
-@code{\-},
-@code{\_},
-@code{\!},
-@code{\%},
-or
-@code{\c}
-in identifiers;
-@acronym{AT&T}
-@command{troff} @c AT&T
-does.
-The
-@code{\A}
-escape sequence
-(@pxref{Identifiers})
-may be helpful in avoiding their use.
-
@cindex trailing space, on input lines, difference from @acronym{AT&T}
@code{troff}
@cindex space, trailing, on input lines, difference from @acronym{AT&T}
@code{troff}
@cindex end-of-sentence detection, cancellation, on @acronym{AT&T} @code{troff}
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index f414db7d8..3cf2f7931 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -6304,31 +6304,6 @@ which both render it as
.\" END Keep in sync with groff.texi node "Other Differences" and
.\" groff_man_style(7).
.
-.
-.P
-GNU
-.I troff \" GNU
-does not allow the use of the escape sequences
-.BR \[rs]| ,
-.BR \[rs]\[ha] ,
-.BR \[rs]& ,
-.BR \[rs]{ ,
-.BR \[rs]} ,
-.BI \[rs] space\c
-,
-.BR \[rs]\[aq] ,
-.BR \[rs]\[ga] ,
-.BR \[rs]\- ,
-.BR \[rs]_ ,
-.BR \[rs]! ,
-.BR \[rs]% ,
-or
-.B \[rs]c
-in identifiers;
-AT&T
-.I troff \" AT&T
-does.
-.
The
.B \[rs]A
escape sequence
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit