Follow-up Comment #3, bug #57556 (project groff): Subsequent comments in that bug are also relevant to this one (and probably really belong here). Of particular note is the observation that groff has several language-specific setup files but lacks one for English, but that tmac/troffrc seems to fulfill this role: it unconditionally sets the hyphenation language to "us" and loads hyphenation patterns and exceptions files hyphen.us and hyphenex.us. Thus tmac/troffrc seems like a reasonable place to enforce the .hy restrictions the English patterns require. But I confess I don't know how non-English groffs are set up (Do they skip troffrc altogether? Does the installation process modify this file to load different hyphenation patterns?), so this is conjecture.
In case it's correct, however, I submit the attached patch as a workaround when using the English patterns until there's a proper fix for this bug. Some notes on it: * As far as I can tell, the roff language lacks bitwise operators, making the logic ugly. * This macro emits a warning when it changes the value that the user requests. I'm not sure it should, but it's easy to remove. * The warning may not follow the style of groff's current warning system. * I retained one .tm I used for debugging, hidden behind an ".if 0". Committer's choice whether to include this in the commit (if the patch is accepted at all). This patch could reasonably be deferred until after the 1.23 release, since it involves (minor) code changes that will have little chance for testing. But it does address a legitimate bug currently existing in groff, that some .hy values cause invalid hyphenations in English. The patch may not be considered complete anyway, as it does nothing with the documentation. The .hy section of doc/groff.texi tries to be language-agnostic--it covers hyphenation parameters of various languages, including English, without assuming a particular language--so it's not clear this is the place to introduce English-specific changes to the .hy defaults. On the other hand, it's not clear what place is. The language-specific setup files for some other languages change the initial value of .hy (though do not restrict what the user subsequently does with it) without seeming to explicitly document this fact, so doing the same for English might be OK. (file #50188) _______________________________________________________ Additional Item Attachment: File name: 57556.workaround.patch Size:1 KB <https://file.savannah.gnu.org/file/57556.workaround.patch?file_id=50188> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?57556> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/