Follow-up Comment #5, bug #67347 (group groff): [comment #4 comment #4:]
> Ingo Schwarze wrote: >> If you worry about item 2, you can instead consider this semantics: >> >> 1. If the current end of sentence status is "yes", \) propagates that >> status to the end of the word. >> 2. If the current end of sentence status is "no", \) has no effect. >> >> Maybe before committing to the semantic change, you should research >> who introduced \) when, and whether they provided a rationale. > It appears to go "all the way back", or practically so. > https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/troff/input.c?h=1.02#n782 Aha, interesting, thank for figuring that out. The oldest version of groff known to me is groff-1.01 (released Mar 13, 1991) that was distributed with 4.3BSD-Net/2 (released Aug 20, 1991). That's almost three months older than the groff-1.02 (released June 2, 1991) where our git repo starts. I don't know why esr@ chose to not include 1.01 when he created the repo in 2013. It was certainly available, for example here: https://minnie.tuhs.org/cgi-bin/utree.pl?file=Net2/usr/src/usr.bin/groff That said, ESCAPE_RIGHT_PARENTHESIS is already in 1.01, and i see these entries in the ChangeLog: Wed Jul 18 10:23:31 1990 James Clark (jjc at yquem) * troff/input.c (token::next): New escape sequence \). * troff/input.c (get_copy): Recognize \) in copy mode. (and much other stuff in the same commit, but no rationale for any of the changes) Even groff-1.01 did not include tmac.doc, so i very much doubt that the invention of \) was motivated by mdoc(7) about eight months earlier. Then, the groff-1.02 CHANGES file contains: "A slightly modified version of the Berkeley tmac.doc is included." But even that was only mdoc(7) version 2, not the mdoc(7) version 3 used in 4.4BSD (and today) and version 2 did not use \), see https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/macros/tmac.doc?h=1.02 . I remember once talking (via email) directly to Cynthia, and she said that the CSRG insisted that her macros be compatible with both Kernighan troff and GNU troff, even though ditching Kernighan compat and going GNU only would have made her life so much easier (and the macros faster), but she wasn't allowed to. James Clark switched to mdoc(7) version 3 in groff-1.05 (released March 18, 1992) https://cgit.git.savannah.gnu.org/cgit/groff.git/commit/macros/tmac.doc?h=1.05 but even there, i see no trace of \), which is hardly surprising given that Cynthia needed Kernighan compat. It seems to me \) first appeared in doc.tmac here: groff commit 058f72af wl@ Mar 23, 2001 Replaced mdoc implementation. almost a decade after groff grew \). It should be easy for you to ask Werner why he chose to use \), certainly easier than first pulling off a full-blown reverse-engineering project. Werner's input on whether changing \) semantics is a wise move might also be valuable, and he might perhaps even know what jjc@'s original design idea was. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?67347> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature