groff
[Top][All Lists]
Advanced

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

Re: mdoc patch: accept any number of arguments for .Dd


From: Ingo Schwarze
Subject: Re: mdoc patch: accept any number of arguments for .Dd
Date: Fri, 17 Jan 2020 01:44:43 +0100
User-agent: Mutt/1.12.2 (2019-09-21)

Hi Colin,

Colin Watson wrote on Thu, Jan 16, 2020 at 11:54:15PM +0000:
> On Thu, Jan 16, 2020 at 06:56:09PM +0100, Ingo Schwarze wrote:

>> TLDR: The point is that i have seen several manuals in a number of
>> different operating systems, both historical (around 1990) and modern
>> (around 2020) that give one or two arguments to .Dd.  From the
>> content of these arguments, it is obvious that they all expect the
>> date to be passed through unchanged.  I don't recall ever having
>> seen a manual page that passes one, two, or four arguments and
>> expects the current behaviour of replacing the arguments with the
>> date of formatting.

> The behaviour change as described seems reasonable to me,

Thanks for having a look at the description.

> although I haven't reviewed the code.  However, is there some good
> reason why this patch doesn't include a matching change to the
> documentation in tmac/groff_mdoc.7.man?

No, there isn't, sorry for the omission.  I think i should just
commit the following diff together with the code change.
The first three sentences resemble the wording in the mdoc(7)
manual page contained in the mandoc(1) package.

Yours,
  Ingo


diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man
index 05f895f9..38964dd3 100644
--- a/tmac/groff_mdoc.7.man
+++ b/tmac/groff_mdoc.7.man
@@ -944,30 +944,32 @@ ugly.
 .Pp
 This macro is neither callable nor parsed.
 .
-.It Li .Dd Oo
-.Aq month
+.It Li .Dd Xo
+.Aq Month
 .Aq day ,
 .Aq year
-.Oc
-If
-.Ql Dd
-has no arguments,
-.Ql Epoch
-is used for the date string.
-If it has exactly three arguments, they are concatenated, separated with
-unbreakable space:
+.Xc
+The document date for display in the page footer.
+This is the mandatory first macro of any
+.Nm \-mdoc
+manual.
+The
+.Aq Month
+is the full English month name, the
+.Aq day
+is an integer number, and the
+.Aq year
+is the full four-digit year, for example:
 .Pp
 .Dl .Dd January 25, 2001
 .Pp
-The month's name shall not be abbreviated.
-.Pp
-With any other number of arguments, the current date is used, ignoring
-the parameters.
+The arguments are concatenated, separated with space characters,
+even if they do not match the recommended format.
 .Pp
 As a special exception, the format
 .Bd -filled -offset indent
 .Li .Dd $Mdocdate:
-.Aq month
+.Aq Month
 .Aq day
 .Aq year
 .Li $



reply via email to

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