[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 08/50: [mm]: Slightly refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 08/50: [mm]: Slightly refactor. |
Date: |
Thu, 4 Jul 2024 21:49:13 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 699e43497bb4bcc249b7d9154eb1aea9b6de0a72
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jun 29 15:36:21 2024 -0500
[mm]: Slightly refactor.
* contrib/mm/m.tmac: Move definitions of diagnostic macros earlier.
Also test for existence of `D` register before testing its value to
determine emission of backtrace (this way `-wreg` doesn't want about
it). This enables the `@warning` macro to be used in validation of
command-line registers (C, D, E, L, W, and so on).
---
contrib/mm/ChangeLog | 8 ++++++++
contrib/mm/m.tmac | 34 ++++++++++++++++++----------------
2 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 62b15e6b1..d81bc5e04 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,11 @@
+2024-06-29 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m.tmac: Move definitions of diagnostic macros earlier. Also
+ test for existence of `D` register before testing its value to
+ determine emission of backtrace (this way `-wreg` doesn't want
+ about it). This enables the `@warning` macro to be used in
+ validation of command-line registers (C, D, E, L, W, and so on).
+
2024-06-29 G. Branden Robinson <g.branden.robinson@gmail.com>
* m.tmac (DE): Fix corrupted error message. Problem introduced
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 1e4848ead..95423dea1 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -49,6 +49,24 @@ http://savannah.gnu.org/bugs/?group=groff.
.if d PH .nx
.
.mso devtag.tmac
+.
+.de @warning
+.tm \\*[@mm]:\\n[.F]:\\n[.c]: warning: \\$*
+.if r D .if \\n[D] .backtrace
+..
+.
+.\" All errors are fatal.
+.de @error
+.tm \\*[@mm]:\\n[.F]:\\n[.c]: error: \\$*
+.if r D .if \\n[D] .backtrace
+.ab
+..
+.
+.de @abort
+.tm \\*[@mm]:\\n[.F]:\\n[.c]: internal error: \\$*
+.backtrace
+.ab
+..
.\" ######## initialize package #######
.\" create table of contents entry for heading of level <= Cl
.nr Cl 2
@@ -383,22 +401,6 @@ http://savannah.gnu.org/bugs/?group=groff.
.ps \\n[@ps]u
.vs \\n[@vs]u
..
-.de @warning
-.tm \\*[@mm]:\\n[.F]:\\n[.c]: warning: \\$*
-.if \\n[D] .backtrace
-..
-.\" All errors are fatal.
-.de @error
-.tm \\*[@mm]:\\n[.F]:\\n[.c]: error: \\$*
-.if \\n[D] .backtrace
-.ab
-..
-.
-.de @abort
-.tm \\*[@mm]:\\n[.F]:\\n[.c]: internal error: \\$*
-.backtrace
-.ab
-..
.de misc@toupper
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
.br
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 08/50: [mm]: Slightly refactor.,
G. Branden Robinson <=