groff-commit
[Top][All Lists]
Advanced

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

[groff] 06/16: [me]: Add diagnostics to `np` and `bu` macros.


From: G. Branden Robinson
Subject: [groff] 06/16: [me]: Add diagnostics to `np` and `bu` macros.
Date: Sun, 10 Sep 2023 15:09:33 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 3c83fc1e16ff947852ca26fe20a5aadba7cd1ddb
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Sep 5 07:32:21 2023 -0500

    [me]: Add diagnostics to `np` and `bu` macros.
    
    * tmac/e.tmac (np, bu): Throw diagnostic if given arguments; we document
      these as being "like" `ip`, but it isn't with respect to argument
      handling.
    
      (sk): Genericize existing diagnostic to use `\$0` to report its own
      name.
---
 ChangeLog   | 8 ++++++++
 tmac/e.tmac | 6 +++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 649f83551..432d6c806 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-09-05  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/e.tmac (np, bu): Throw diagnostic if given arguments; we
+       document these as being "like" `ip`, but it isn't with respect
+       to argument handling.
+       (sk): Genericize existing diagnostic to use `\$0` to report its
+       own name.
+
 2023-09-04  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [ms]: Doug McIlroy pointed out a hazard of the Berkeley DD
diff --git a/tmac/e.tmac b/tmac/e.tmac
index b30a6142a..bed384189 100644
--- a/tmac/e.tmac
+++ b/tmac/e.tmac
@@ -696,7 +696,7 @@
 .
 .de sk                 \" *** leave a blank page (next page)
 .if \\n(.$>0 \
-.      do @err ignoring argument(s) to 'sk'
+.      do @err ignoring argument(s) to '\\$0'
 .nr ?s 1
 ..
 .
@@ -790,6 +790,8 @@
 ..
 .
 .de np                 \" *** numbered paragraph
+.if \\n(.$>0 \
+.      do @err ignoring argument(s) to '\\$0'
 .\" use output comparison in case user has changed format of $p
 .if '\\n($p'-1' \
 .      nr $p 0                 \" reset number after .bu
@@ -800,6 +802,8 @@
 ..
 .
 .de bu                 \" *** bulleted paragraph
+.if \\n(.$>0 \
+.      do @err ignoring argument(s) to '\\$0'
 .br
 .\" use output comparison in case user has changed format of $p
 .if '\\n($p'-1' \



reply via email to

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