[PATCH] man pages: define consistent fallback strings for lq and dq
"G. Branden Robinson" <[email protected]> Fri, 10 Oct 2025 05:01:23 -0500
| Newsgroups | gmane.comp.version-control.rcs.bugs |
|---|---|
| Message-ID | <20251010100123.srq6qvkiebxp5ovn@illithid> |
--iyjuithbrdi7m3bi
Content-Type: multipart/mixed; protected-headers=v1;
boundary="5cq7xj3qc5bpo4go"
Content-Disposition: inline
Subject: [PATCH] man pages: define consistent fallback strings for lq and dq
MIME-Version: 1.0
--5cq7xj3qc5bpo4go
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
[please CC me on replies, as I am not subscribed to bug-rcs@gnu]
Context: https://lists.gnu.org/archive/html/bug-gawk/2025-03/msg00026.html
In rcs(1), define fallbacks for *roff strings `lq` and `rq` the same way
GNU gawk and GNU grep do. Also do this in the co(1) man page, since it
employs those strings.
The `lq` and `rq` strings are not a groffism, but originate in 4BSD
(1980).[1] They entered Unix System V with SVR4 (1988 or 1989).[2]
mandoc(1) has supported them since its inception.[3]
Plan 9 troff is the only implementation I know of that doesn't define
these strings in its man(7) package; I am preparing a patch for Plan 9
=66rom User Space, a.k.a. "plan9port".
[1] https://minnie.tuhs.org/cgi-bin/utree.pl?file=3D4BSD/usr/lib/tmac/tmac.=
an.new
[2]
https://github.com/ryanwoodsmall/oldsysv/blob/e68293af91e2dc39f5f29c20d7e42=
9f9e0cabc75/sysvr4/svr4/ucbcmd/troff/troff.d/tmac.d/an#L46
[3] https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mandoc/predefs.in=
?rev=3D1.1&content-type=3Dtext/x-cvsweb-markup
Patch attached.
Regards,
Branden
--5cq7xj3qc5bpo4go
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="gbr-rcs.diff"
diff --git a/man/co.1in b/man/co.1in
index 7adb208..381af25 100644
--- a/man/co.1in
+++ b/man/co.1in
@@ -2,6 +2,17 @@
.so b-base
.if n .ds - \%--
.if t .ds - \(em
+.if !\w@\*(lq@ \{\
+.\" The implementation doesn't seem to support the strings `lq` or `rq`.
+. ie \n(.g \{\
+. ds lq \(lq\"
+. ds rq \(rq\"
+. \}
+. el \{\
+. ds lq ``
+. ds rq ''
+. \}
+.\}
.TH CO 1 "\*(Dt" "GNU RCS \*(Rv"
.SH NAME
co \- check out RCS revisions
diff --git a/man/rcs.1in b/man/rcs.1in
index 76b2107..8a8bce8 100644
--- a/man/rcs.1in
+++ b/man/rcs.1in
@@ -2,14 +2,15 @@
.so b-base
.if n .ds - \%--
.if t .ds - \(em
-.if !\n(.g \{\
-. if !\w|\*(lq| \{\
-. ds lq ``
-. if \w'\(lq' .ds lq "\(lq
+.if !\w@\*(lq@ \{\
+.\" The implementation doesn't seem to support the strings `lq` or `rq`.
+. ie \n(.g \{\
+. ds lq \(lq\"
+. ds rq \(rq\"
. \}
-. if !\w|\*(rq| \{\
+. el \{\
+. ds lq ``
. ds rq ''
-. if \w'\(rq' .ds rq "\(rq
. \}
.\}
.TH RCS 1 "\*(Dt" "GNU RCS \*(Rv"
--5cq7xj3qc5bpo4go--
--iyjuithbrdi7m3bi
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmjo2XMACgkQ0Z6cfXEm
bc5bPw//S9pTHXk/qxNYj8sVNeo94Hz8JMUh20cTIk3GklS0rO0oI4DnqXhUDi2D
VS2ShGa5rgh/sEuu9BYE9Mge2r1TXqUUuPtFEk90DMB5AunVMlPLaCK6lQ5Sh30/
DfeuMaKLIN0vE5w0vp7PmVjwmMqvlbDT5vevmKuKKf4HPm+z6HhHwd5f8a6ejPEW
KA4zW7hnUgqQ/5PYHTVth5Ag6aZJ2ycI5CarO4albEHfH4rpLgJR6s/CWOnrqPrt
p4pVBMrA3q+mOO/nkudkQrqoOIICeIrM56UFklPtvcqIjpSuOP430LaP0e/KlAUU
Ai751ovsCEZgn+/6LyzbZFPFQX52p/Z8lBLp0oxp1i08iJVVCUN1f057USQFxafL
Bw7axvJvoDg8Pkm/MtSRduxaeiZa+0KeHr/BxfmE8JDn0suDkmHWHIPYdBoEJzcZ
qJTST0/nu0QCOIIn/srrHvyVyh454UAhDF4u2md7b/DOJ0WxLJzoGQ0gnMc8dCis
TBtaA2zkJWBPaiOzekwZHYArG6iIpZyy35W5lHKeaQ+73K9E0qhvELe4QJLaloi5
ADrYuTuBOvuTmPH2GYXaJNtbe6RXNj9i9apUlqaCxHWzyCl8kaQP5Ia3ji157eOZ
oMgeurweXOWPobNTQOG51iGXoP09FznSpjrdoJmR3PB1lVW/p88=
=chlg
-----END PGP SIGNATURE-----
--iyjuithbrdi7m3bi--