groff-commit
[Top][All Lists]
Advanced

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

[groff] 15/15: tmac/an-old.tmac: Add and use new an-warn macro.


From: G. Branden Robinson
Subject: [groff] 15/15: tmac/an-old.tmac: Add and use new an-warn macro.
Date: Tue, 20 Oct 2020 14:00:34 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 5c575c5be9c47f86869d17a3b829d35c5a500142
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Oct 19 04:46:01 2020 +1100

    tmac/an-old.tmac: Add and use new an-warn macro.
    
    * tmac/an-old.tmac (an-warn): New; emits warning diagnostic.
      (R): Use new macro instead of .tm* requests directly.
---
 ChangeLog        |  5 +++++
 tmac/an-old.tmac | 10 ++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e165f9f..a055295 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-10-18  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/an-old.tmac (an-warn): New; emits warning diagnostic.
+       (R): Use new macro instead of .tm* requests directly.
+
 2020-10-18  Ingo Schwarze <schwarze@openbsd.org>
 
        #include "config.h" before <stdio.h>
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index f169f54..0d2ae2e 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -42,6 +42,10 @@
 .  ab \*[an-msg]
 .\}
 .
+.de an-warn
+.  tm \*[an-old]:\\n[.F]:\\n[.c]: warning: \\$*
+..
+.
 .nr need_eo_h 0
 .nr need_col2 0
 .
@@ -606,8 +610,10 @@
 .de1 R
 \c
 .  ie \\n[.$] \{\
-.    tmc \\*[an-old]: \\n[.F]: line \\n[.c]: 'R' is a string
-.    tm1 " (producing the registered sign), not a macro.
+.    ds an-msg 'R' is a string (producing the registered sign),\"
+.    as an-msg " not a macro\"
+.    an-warn \\*[an-msg]
+.    rm an-msg
 .    nop \\$*
 .  \}
 .  el \{\



reply via email to

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