groff-commit
[Top][All Lists]
Advanced

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

[groff] 02/14: [man]: Style-warn if MT, UR not given arguments.


From: G. Branden Robinson
Subject: [groff] 02/14: [man]: Style-warn if MT, UR not given arguments.
Date: Fri, 6 Jan 2023 16:20:10 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit fba58f5927caa86be9f01013be6e2962f2ff952c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
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 <g.branden.robinson@gmail.com>
+
+       * tmac/an.tmac (MT, UR): Throw style warning if macro called
+       without (exactly one) argument.
+
 2022-12-27  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * 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 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
 ..



reply via email to

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