groff-commit
[Top][All Lists]
Advanced

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

[groff] 07/07: [mdoc]: Emit diagnostic if .Mt given no arguments.


From: G. Branden Robinson
Subject: [groff] 07/07: [mdoc]: Emit diagnostic if .Mt given no arguments.
Date: Sun, 20 Dec 2020 03:38:56 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 854fec5025af62c6ba6b72f9075bc71317d83a60
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Dec 20 18:57:05 2020 +1100

    [mdoc]: Emit diagnostic if .Mt given no arguments.
    
    * tmac/doc.tmac-u (Mt): Emit a usage diagnostic and return if called
      with no arguments.  This introduces an incompatiblility with
      mandoc(1), but the existing behavior (print an italicized tilde,
      because Mt is implemented as a wrapper around Pa, which prints
      pathnames) made no sense.
    
      mandoc(1) prints a _non_-italicized tilde in this scenario.
---
 ChangeLog       | 8 ++++++++
 tmac/doc.tmac-u | 6 ++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 904e0f7..ea8d123 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2020-12-20  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * tmac/doc.tmac-u (Mt): Emit a usage diagnostic if called with
+       no arguments.  This introduces an incompatiblility with
+       mandoc(1), but the existing behavior (print an italicized tilde,
+       because Mt is implemented as a wrapper around Pa, which prints
+       pathnames) made no sense.
+
+2020-12-20  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * doc/ms.ms (Basic Information): Tweak unit definitions.  groff
        defines a typesetter's point as precisely 1/72 inches.  Also use
        the correct symbol for inch units--strictly, it's the same as
diff --git a/tmac/doc.tmac-u b/tmac/doc.tmac-u
index a5fd82d..eab0c27 100644
--- a/tmac/doc.tmac-u
+++ b/tmac/doc.tmac-u
@@ -6444,8 +6444,10 @@
 .\" NS   mailto (for conversion to HTML)
 .
 .de Mt
-.  \" XXX: error handling missing
-.  Pa \$@
+.  ie !\n[.$] \
+.    tm mdoc usage error: .Mt email-address (#\n[.c])
+.  el \
+.    Pa \$@
 ..
 .
 .



reply via email to

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