groff
[Top][All Lists]
Advanced

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

[Groff] PING: mdoc: handle OpenBSD-style $Mdocdate CVS keyword


From: Ingo Schwarze
Subject: [Groff] PING: mdoc: handle OpenBSD-style $Mdocdate CVS keyword
Date: Tue, 12 Aug 2014 15:54:37 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,

in view of Werner's plan to roll a release soonish, i'm looking
through my groff stuff to see whether there are any simple patches
you might want to put in.

This one apparently fell through the cracks and never received any
feedback, neither positive nor negative.  I still think it makes
sense to include it upstream.

Yours,
  Ingo

----- Forwarded message from Ingo Schwarze <address@hidden> -----

From: Ingo Schwarze <address@hidden>
Date: Tue, 1 Nov 2011 20:09:20 +0100
To: address@hidden
Subject: [Groff] mdoc: handle OpenBSD-style $Mdocdate CVS keyword

Hi,

in OpenBSD, we are using CVS keyword substitution to automatically
update the manual page date when committing to the manual page -
updating the date was too often forgotten before this was implemented,
and typos crept into the dates as well.  It looks like this:

.Dd $Mdocdate: March 5 2011 $
.Dt CAT 1
.Os

To make groff handle that, i'm using the following patch.

Maybe you want to include it upstream?
It costs very little, and it helps people who want to read
OpenBSD manuals on other operating systems.

Thanks,
  Ingo


--- tmac/doc-common.orig        Fri Dec 31 08:33:09 2010
+++ tmac/doc-common     Sun Oct 30 23:21:38 2011
@@ -685,7 +685,9 @@
 .  ds doc-command-name
 .
 .  ie \n[.$] \{\
-.    ie (\n[.$] == 3) \
+.    ie "\$1"$Mdocdate:" \
+.      ds doc-date-string \$2\~\$3, \$4
+.    el .ie (\n[.$] == 3) \
 .      ds doc-date-string \$1\~\$2 \$3
 .    el \{\
 .      ds doc-date-string "\*[doc-date-\n[mo]]

----- End forwarded message -----



reply via email to

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