groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 23/31: [mm]: Cease warning level manipulation.


From: G. Branden Robinson
Subject: [groff] 23/31: [mm]: Cease warning level manipulation.
Date: Sun, 30 May 2021 11:12:37 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 132843d46f264858c5f1650c840d71998efbda7a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun May 30 17:53:32 2021 +1000

    [mm]: Cease warning level manipulation.
    
    Stop mm macro package from manipulating warnings.
    
    * contrib/mm/m.tmac: Remove code that attempted to enable all warnings
      if none were given on the command line.  It did this by simply
      comparing the value of the warning register (\n[.warn]) against the
      default value; but of course, a user could specify -w options that
      exactly matched the default and the test would not be able to tell,
      causing puzzling and undesired behavior.  Furthermore, the hard-coded
      default was out of date and did not correspond to recent releases of
      groff.  If you want all warnings on, use the ".warn" request with no
      arguments in your mm document or pass "-w w" to groff (see troff(1) or
      the Texinfo manual for more on warnings).
    
    See commit 5aa934e7, 20 February 2020.
    
    mm _does_ retain one bit of warning manipulation; when run in
    reference-gathering mode (typically by mmroff), it shuts all warnings
    off so as to not clutter the standard error stream with diagnostics
    amid the reference entries.
---
 ChangeLog         | 20 ++++++++++++++++++++
 NEWS              | 10 +++++-----
 contrib/mm/m.tmac |  1 -
 3 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b4c8870..6c220e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2021-05-30  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       [mm]: Cease warning level manipulation.
+
+       Stop mm macro package from manipulating warnings.
+
+       * contrib/mm/m.tmac: Remove code that attempted to enable all
+       warnings if none were given on the command line.  It did this by
+       simply comparing the value of the warning register (\n[.warn])
+       against the default value; but of course, a user could specify
+       -w options that exactly matched the default and the test would
+       not be able to tell, causing puzzling and undesired behavior.
+       Furthermore, the hard-coded default was out of date and did not
+       correspond to recent releases of groff.  If you want all
+       warnings on, use the ".warn" request with no arguments in your
+       mm document or pass "-w w" to groff (see troff(1) or the Texinfo
+       manual for more on warnings).
+
+       See commit 5aa934e7, 20 February 2020.
+
+2021-05-30  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * contrib/mm/examples/letter.mm: Revise to be a better example:
        use macro package more effectively, follow *roff input
        conventions more carefully, and incorporate more accurate
diff --git a/NEWS b/NEWS
index c16f910..5950626 100644
--- a/NEWS
+++ b/NEWS
@@ -147,6 +147,11 @@ o The doc (mdoc) macro package now honors the HY register 
as the an
   furthermore recognizes but ignores the AD string (see above) for
   compatibility with an (man).
 
+o The m (mm) and s (ms) macro packages no longer manipulate the warning
+  level.  If you want all warnings on, use the ".warn" request with no
+  arguments in your document or pass "-w w" to groff (see troff(1) or
+  the groff Texinfo manual for more on warnings).
+
 o The s (ms) macro package supports a new string, FR, which defines the
   ratio of the footnote line length to the current line length.  The
   default expression is "11/12", 11/12ths of the normal line length,
@@ -171,11 +176,6 @@ o The s (ms) macro package has added strings, \*< and \*>, 
to perform
   \*} superscripting strings that have been present in groff ms since
   1991 or earlier.
 
-o The s (ms) macro package no longer manipulates the warning level.  If
-  you want all warnings on, use the ".warn" request with no arguments in
-  your ms document or pass "-w w" to groff (see troff(1) or the groff
-  Texinfo manual for more on warnings).
-
 grotty
 ------
 
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 314b2a5..416a7bd 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -31,7 +31,6 @@ Index         array!index
 .if \n(.C \
 .  ab groff mm macros do not work in compatibility mode; aborting
 .ds @mm m.tmac\"
-.if (\n[.warn] == 65543) .warn
 .mso devtag.tmac
 .\" ######## init #######
 .\"    Contents level [0:14], contents saved if heading level <= Cl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]