[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 29/51: [mdoc]: Trivially refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 29/51: [mdoc]: Trivially refactor. |
Date: |
Sun, 11 Sep 2022 08:15:53 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 5fa56821769a8d8434b040a15dab6947eaf3035a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Sep 7 19:04:09 2022 -0500
[mdoc]: Trivially refactor.
Relocate string and macro definition within file. mdoc(7) mandates that
the document setup macros `Dd`, `Dt`, and `Os` be called in that order;
arrange their definitions accordingly, for maintainability.
---
ChangeLog | 7 +++++++
tmac/mdoc/doc-common | 52 ++++++++++++++++++++++++++--------------------------
2 files changed, 33 insertions(+), 26 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a4060d2cc..f69208a13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-09-07 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [mdoc]: Trivially refactor. Relocate string and macro
+ definition within file. mdoc(7) mandates that the document
+ setup macros `Dd`, `Dt`, and `Os` be called in that order;
+ arrange their definitions accordingly, for maintainability.
+
2022-09-06 G. Branden Robinson <g.branden.robinson@gmail.com>
[mdoc]: Refactor. Rename strings and macro for clarity. These
diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common
index 99f3a12ac..98e21fb5e 100644
--- a/tmac/mdoc/doc-common
+++ b/tmac/mdoc/doc-common
@@ -249,6 +249,32 @@
.ec
.
.
+.\" NS doc-date-string global string
+.\" NS the manual page date as set by 'Dd'
+.
+.ds doc-date-string UNDATED\"
+.
+.
+.\" NS Dd user macro (not parsed, not callable)
+.\" NS set document date
+.\" NS
+.\" NS modifies:
+.\" NS doc-date-string
+.\" NS
+.\" NS width register 'Dd' set above
+.
+.eo
+.de Dd
+. if !\n[.$] \
+. tm mdoc warning: .Dd directive expects an argument (#\n[.c])
+. if \n[.$] \{\
+. ie "\$1"$Mdocdate:" .ds doc-date-string \$2\~\$3, \$4\"
+. el .ds doc-date-string \$*\"
+. \}
+..
+.ec
+.
+.
.\" NS Dt user macro (not parsed, not callable)
.\" NS document title
.\" NS
@@ -926,32 +952,6 @@
.ec
.
.
-.\" NS doc-date-string global string
-.\" NS the manual page date as set by 'Dd'
-.
-.ds doc-date-string UNDATED\"
-.
-.
-.\" NS Dd user macro (not parsed, not callable)
-.\" NS set document date
-.\" NS
-.\" NS modifies:
-.\" NS doc-date-string
-.\" NS
-.\" NS width register 'Dd' set above
-.
-.eo
-.de Dd
-. if !\n[.$] \
-. tm mdoc warning: .Dd directive expects an argument (#\n[.c])
-. if \n[.$] \{\
-. ie "\$1"$Mdocdate:" .ds doc-date-string \$2\~\$3, \$4\"
-. el .ds doc-date-string \$*\"
-. \}
-..
-.ec
-.
-.
.\" NS doc-hyphen-flags global register
.\" NS the parameter for the '.hy' request
.ie \n[HY] \{\
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 29/51: [mdoc]: Trivially refactor.,
G. Branden Robinson <=