[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 28/30: [mdoc]: Add a (helpful?) warning.
From: |
G. Branden Robinson |
Subject: |
[groff] 28/30: [mdoc]: Add a (helpful?) warning. |
Date: |
Thu, 10 Oct 2024 20:18:15 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit e219991c7c6d1a355199eec3f884dd595de7a663
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Oct 10 10:42:54 2024 -0500
[mdoc]: Add a (helpful?) warning.
* tmac/doc.tmac (doc-enclose-string): Add warning. mdoc input like this
.Sq ,
...is something I see from time to time; it's a conspicuous hazard of
mdoc's macro system within a macro system. It leads to an unhelpful
diagnostic when GNU troff warnings are dialed up.
warning: register 'doc-type0' not defined
Throw document maintainers, if not readers, a bone.
Observed in a shell (from the Sindh? maybe the Punjab) known as Lokesh.
troff:../loksh/ksh.1:977: warning: register 'doc-type0' not defined
---
ChangeLog | 16 ++++++++++++++++
tmac/doc.tmac | 2 ++
2 files changed, 18 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 8d58062aa..18117793f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2024-10-10 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * tmac/doc.tmac (doc-enclose-string): Add warning. mdoc input
+ like this
+
+ .Sq ,
+
+ ...is something I see from time to time; it's a conspicuous
+ hazard of mdoc's macro system within a macro system. It leads
+ to an unhelpful diagnostic when GNU troff warnings are dialed
+ up.
+
+ warning: register 'doc-type0' not defined
+
+ Throw document maintainers, if not readers, a bone.
+
2024-10-10 G. Branden Robinson <g.branden.robinson@gmail.com>
* tmac/an.tmac:
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index 8a39d0935..c926b6419 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -1724,6 +1724,8 @@
. \" resp. suffix
. ie (\n[doc-type\n[doc-arg-count]] == 3) \{\
. nr doc-reg-des (\n[doc-arg-count] - 1)
+. if !r doc-type\n[doc-reg-des] \
+. doc-warn possible missing dummy character '\&' before argument
. while (\n[doc-type\n[doc-reg-des]] == 3) \
. nr doc-reg-des -1
.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 28/30: [mdoc]: Add a (helpful?) warning.,
G. Branden Robinson <=