gbranden pushed a commit to branch master
in repository groff.
commit fba58f5927caa86be9f01013be6e2962f2ff952c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Jan 3 10:12:02 2023 -0600
[man]: Style-warn if MT, UR not given arguments.
* tmac/an.tmac (MT, UR): Throw style warning if macro called without
(exactly one) argument.
---
ChangeLog | 5 +++++
tmac/an.tmac | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index f68d4d418..459bcee46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-01-03 G. Branden Robinson <[email protected]>
+
+ * tmac/an.tmac (MT, UR): Throw style warning if macro called
+ without (exactly one) argument.
+
2022-12-27 G. Branden Robinson <[email protected]>
* doc/doc.am (doc/groff-man-pages.pdf): Set (sub) section
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 78ad7cc9d..a00340573 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1129,6 +1129,8 @@ contains unsupported escape sequence
.\" a diversion; it becomes the link text for the hyperlinked address.
.\" .MT [email protected]
.de1 MT
+. if !(\\n[.$] = 1) \
+. an-style-warn .\\$0 expects 1 argument, got \\n[.$]
. ds an*prefix mailto:
. an*begin-hyperlink \\$1
..
@@ -1145,6 +1147,8 @@ contains unsupported escape sequence
.\" a diversion; it becomes the link text for the hyperlinked address.
.\" .UR [email protected]
.de1 UR
+. if !(\\n[.$] = 1) \
+. an-style-warn .\\$0 expects 1 argument, got \\n[.$]
. ds an*prefix \" empty
. an*begin-hyperlink \\$1
..
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit