From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id oASHh8LL023040 for ; Sun, 28 Nov 2010 12:43:10 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1PMlHF-0006Q9-V3; Sun, 28 Nov 2010 18:43:06 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1PMlHF-00027D-U3; Sun, 28 Nov 2010 18:43:05 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1PMlHF-0005sI-T9; Sun, 28 Nov 2010 18:43:05 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1PMlHF-0000jD-N4; Sun, 28 Nov 2010 18:43:05 +0100 Date: Sun, 28 Nov 2010 18:43:05 +0100 From: Ingo Schwarze To: Jason McIntyre Cc: tech@mdocml.bsd.lv Subject: Re: minor mdoc.7 improvements Message-ID: <20101128174305.GB23201@iris.usta.de> References: <20101127222709.GE27534@iris.usta.de> <20101127224144.GB27550@kerhand.co.uk> <20101128002246.GF27534@iris.usta.de> <20101128080507.GA4033@kerhand.co.uk> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101128080507.GA4033@kerhand.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Jason, > my point is that your description of Xo talks only in terms of using > it for the It macro, but it can be used with many others. OK, so lets try again. Explaining it the other way round needs a bit more verbosity, but i think it is worth spending the space because .Xo is notoriously a source of confusion. Yours, Ingo Index: mdoc.7 =================================================================== RCS file: /cvs/src/share/man/man7/mdoc.7,v retrieving revision 1.56 diff -u -r1.56 mdoc.7 --- mdoc.7 28 Nov 2010 15:45:26 -0000 1.56 +++ mdoc.7 28 Nov 2010 17:31:52 -0000 @@ -2659,9 +2659,60 @@ Close a scope opened by .Sx \&Xo . .Ss \&Xo -Open an extension scope. -This macro originally existed to extend the 9-argument limit of troff; -since this limit has been lifted, the macro has been deprecated. +Extend the header of an +.Sx \&It +macro or the body of a partial-implicit block macro +beyond the end of the input line. +This macro originally existed to work around the 9-argument limit +of historic +.Xr roff 7 . +.Pp +Regarding partial-implicit block macros, this has never been very useful +because it is almost always better to use the corresponding +partial-explicit block macro when many, long or complex arguments +are required. +For example, rewrite awkward code like +.Bd -literal -offset indent +\&.Op Fl s Ar modifier Xo +\&.Op Fl R Ar id +\&.Xc +.Ed +.Pp +to the clear and fully portable form +.Bd -literal -offset indent +\&.Oo +\&.Fl s Ar modifier +\&.Op Fl R Ar id +\&.Oc +.Ed +.Pp +Thus, the only sensible use for +.Sx \&Xo +has been in +.Sx \&It +lines, for example: +.Bd -literal -offset indent +\&.It Xo +\&.No if Ar list ; +\&.No then Ar list ; +\&.Oo elif Ar list ; +\&.No then Ar list ; Oc +\&.No ... +\&.Oo else Ar list ; Oc +\&.No fi +\&.Xc +.Ed +.Pp +Since the 9-argument limit has been lifted, it is now possible to use +line continuation with a backslash at the end of the line instead; +but remeber that such code is not portable to historic +.Nm +implementations: +.Bd -literal -offset indent +\&.It if Ar list ; No then Ar list ; \e + Oo elif Ar list ; No then Ar list ; Oc No ... \e + Oo else Ar list ; Oc No fi +.Ed .Ss \&Xr Link to another manual .Pq Qq cross-reference . -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv