summaryrefslogtreecommitdiff
path: root/tmac
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2023-01-03 10:12:02 -0600
committerG. Branden Robinson <g.branden.robinson@gmail.com>2023-01-03 10:12:02 -0600
commitfba58f5927caa86be9f01013be6e2962f2ff952c (patch)
tree27e0081437cef88f0e04dfd8b0ea7ff4220e1778 /tmac
parente12c5601d758928e0452a5f85f86da87b0958e38 (diff)
downloadgroff-git-fba58f5927caa86be9f01013be6e2962f2ff952c.tar.gz
[man]: Style-warn if MT, UR not given arguments.
* tmac/an.tmac (MT, UR): Throw style warning if macro called without (exactly one) argument.
Diffstat (limited to 'tmac')
-rw-r--r--tmac/an.tmac4
1 files changed, 4 insertions, 0 deletions
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 nobody@example.com
.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 nobody@example.com
.de1 UR
+. if !(\\n[.$] = 1) \
+. an-style-warn .\\$0 expects 1 argument, got \\n[.$]
. ds an*prefix \" empty
. an*begin-hyperlink \\$1
..