[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 03/07: [man]: Deprecation-warn on use of .DT, .PD.
From: |
G. Branden Robinson |
Subject: |
[groff] 03/07: [man]: Deprecation-warn on use of .DT, .PD. |
Date: |
Thu, 20 May 2021 01:23:17 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 37f8e631d0547d612507e09fee4543bb3474118d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu May 20 10:34:03 2021 +1000
[man]: Deprecation-warn on use of .DT, .PD.
Add warnings for macros deprecated in groff_man(7), emitted if the
CHECKSTYLE register is greater than 1.
* tmac/an-old.tmac (an-deprecation-warn): New macro emits diagnostic.
(DT, PD): Call the foregoing, re-using arguments.
Be advised that our groff(7) page will trigger the .PD warning like
gangbusters, because a previous author of that page used it with .TP to
simulate the tables in the front matter of CSTR #54.
---
ChangeLog | 9 +++++++++
tmac/an-old.tmac | 7 +++++++
2 files changed, 16 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 7b2998d..859dc85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2021-05-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+ Add warnings for macros deprecated in groff_man(7), emitted if
+ the CHECKSTYLE register is greater than 1.
+
+ * tmac/an-old.tmac (an-deprecation-warn): New macro emits
+ diagnostic.
+ (DT, PD): Call the foregoing, re-using arguments.
+
+2021-05-20 G. Branden Robinson <g.branden.robinson@gmail.com>
+
* tmac/an-old.tmac: Refactor to move bodies of DT and PD into
private macros.
(an-reset-tab-stops, an-reset-paragraphp-spacing): New names for
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 40d4403..a4e6b4a 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -56,6 +56,11 @@
. tm \*[an-old]:\\n[.F]:\\n[.c]: style: \\$*
..
.
+.de an-deprecation-warn
+. if (\\n[CHECKSTYLE] > 1) \
+. an-style-warn use of deprecated macro: .\\$0
+..
+.
.\" Define alternate requests to handle continuous rendering.
.\"
.\" This .ne replacement avoids page breaks; instead, the page length is
@@ -273,10 +278,12 @@
..
.
.de1 DT
+\\*[an-deprecation-warn]\\
. an-reset-tab-stops
..
.
.de1 PD
+\\*[an-deprecation-warn]\\
\\*[an-reset-paragraph-spacing]\\
..
.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 03/07: [man]: Deprecation-warn on use of .DT, .PD.,
G. Branden Robinson <=