groff-commit
[Top][All Lists]
Advanced

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

[groff] 21/31: contrib/mm/m.tmac: Update diagnostics.


From: G. Branden Robinson
Subject: [groff] 21/31: contrib/mm/m.tmac: Update diagnostics.
Date: Sun, 30 May 2021 11:12:36 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 7feb8da27c4358659cf51bc062ee0cc4f6c592c5
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun May 30 11:45:10 2021 +1000

    contrib/mm/m.tmac: Update diagnostics.
    
    * contrib/mm/m.tmac: Update diagnostics.  When aborting, explicitly tell
      the user we are doing so (see
      a334cc97abbdfb9c41e28fcd7c187b81a0a3ceac, 25 September 2020).
    
      (@mm): Define new string to hold prefix for diagnostic messages.
    
      (@warning, @error): Use @mm.  Reorder diagnostic messages to conform
      with GNU Coding Standards.
    
      (OK, PM): Use @warning instead of `tm` request directly.
    
    Also convert affected tm requests to use the regular control character
    instead of the no-break one.  .tm requests should never cause a break.
---
 ChangeLog         | 10 ++++++++++
 contrib/mm/m.tmac | 17 ++++++++++-------
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1a596ba..14d4742 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2021-05-30  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * contrib/mm/m.tmac: Update diagnostics.  When aborting,
+       explicitly tell the user we are doing so (see
+       a334cc97abbdfb9c41e28fcd7c187b81a0a3ceac, 25 September 2020).
+       (@mm): Define new string to hold prefix for diagnostic messages.
+       (@warning, @error): Use @mm.  Reorder diagnostic messages to
+       conform with GNU Coding Standards.
+       (OK, PM): Use @warning instead of `tm` request directly.
+
 2021-05-29  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/papersize.tmac: Improve diagnostic message; when
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index ec7b191..314b2a5 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -25,9 +25,12 @@ Extern names module@name
 Env.var                environ:name
 Index          array!index
 ..
-.if !\n(.g .ab These mm macros require groff.
+.if !\n(.g \
+.  ab groff mm macros require groff extensions; aborting
 .do if d PH .nx
-.if \n(.C .ab The groff mm macros do not work in compatibility mode.
+.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 #######
@@ -375,15 +378,15 @@ Index             array!index
 .vs \\n[@vs]u
 ..
 .de @warning
-'tm WARNING:(\\n[.F]) input line \\n[.c]:\\$*
+'tm \\*[@mm]:\\n[.F]:\\n[.c]: warning: \\$*
 .if \\n[D] .backtrace
 ..
 .de @error
 'tm ******************
-'tm ERROR:(\\n[.F]) input line \\n[.c]:\\$*
+'tm \\*[@mm]:\\n[.F]:\\n[.c]: error: \\$*
 .if \\n[D] .backtrace
 'tm ******************
-.ab "Input aborted, syntax error"
+.ab \\*[@mm]: syntax error; aborting
 ..
 .de misc@toupper
 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
@@ -927,10 +930,10 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%]
 .\" ######## module uni #################
 .\" unimplemented macros
 .de OK
-'tm "OK: not implemented"
+.@warning OK: not implemented
 ..
 .de PM
-'tm "PM: not implemented"
+.@warning PM: not implemented
 ..
 .\" ######## module hd #################
 .\" support for usermacro



reply via email to

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