[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #57583] [PATCH] s.tmac: Test the default number for warnings for nr
G. Branden Robinson
[bug #57583] [PATCH] s.tmac: Test the default number for warnings for nroff
Tue, 4 Feb 2020 17:32:56 -0500 (EST)
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 PureBrowser/60.9.0
Follow-up Comment #4, bug #57583 (project groff):
> Your own wording is wrong.
> 1) .\" Enable warnings (only if none are given on the command line).
groff(7) does not document what .warn with no arguments does. That's a
.warn with no arguments _turns all warnings on_.
But even so, you're not testing what was given on the command-line. This
comment, which predates your patch, is misleading. Warnings don't keep track
of what set them. You don't know how the \n[.warn] register got set to the
value it has. What I _think_ you're doing is checking the value of this
register against the current (groff 1.22.4) default, judging by the following
$ for TS in utf8 ps; do printf '.tm \\n[.warn]\n' | groff -T$TS; done
Someone could specify a sequence of -w and -W arguments that reproduce the
default, and falsify your comment, because you'd still turn all the warnings
So, you're right, my wording was incorrect. It should have been
"tmac/s.tmac: Enable all warnings in nroff mode if warning register has its
Your patch makes more sense to me now. I don't know if it is good policy for
the macro package to be doing this, but your patch makes its behavior more
consistent with what its intention appears to be; the original implementer
perhaps did not think about nroff mode, or didn't care, or this code dates
back to a time when the \n[.warn] values did not differ between the modes.
Interestingly, the `.nroff` and `.troff` requests do not affect `\n[.warn]`:
As none of these are classical roff requests I suppose we can revisit the
issue of whether the above is good behavior.
Regarding starting sentences on new lines, that's fine material for a
Reply to this item at:
Message sent via Savannah