Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

A possible fix of an indentation problem in manages



This is a reply to old posts X-seq: 29369, 29370
http://www.zsh.org/mla/workers/2011/msg00804.html
http://www.zsh.org/mla/workers/2011/msg00805.html

As pointed out in the above post, indentation of the text in the
description of _arguments in zshcompsys.1 has a problem. I think
that the place where the problem starts is:

                            ....
                            the  first  optarg  that  follows the optspec; see
                            below.

              It is possible for options with a literal `+' or `=' to  appear,
              but that character must be quoted, for example `-\+'. 


Here, the indentation level is reduced by 2, but I think it should
be reduce only by 1. 
This is due to that ENDITEM is redefined to emit '.RE' and used twice
by the macros item() and enditem().

A similar problem exists also in zshzle.1 (description of bindkey)
and zshmodule.1 (zparseopt).

The following patch *seems* to fix the problem, at least for the current
manpages. But even if it works, there may be a better way than to
re-re-define ENDITEM...


diff --git a/Doc/zman.yo b/Doc/zman.yo
index 8d17f78..3329cb9 100644
--- a/Doc/zman.yo
+++ b/Doc/zman.yo
@@ -110,7 +110,7 @@ def(startitem)(0)(\
 def(enditem)(0)(\
   ENDITEM()\
   STDPAR()\
-  +redef(ENDITEM)(0)(NOTRANS(.RE)STDPAR())\
+  +redef(ENDITEM)(0)(NOTRANS(.RE)STDPAR()redef(ENDITEM)(0)(CMT()))\
 )
 def(item)(2)(\
   NOTRANS(.TP)+NL()\
@@ -121,7 +121,7 @@ def(item)(2)(\
   +redef(PARAGRAPH)(0)(\
     NL()NOTRANS(.RS)+NL()NOTRANS(.PP)+NL()\
     STDPAR()\
-    +redef(ENDITEM)(0)(NOTRANS(.RE)STDPAR())\
+    +redef(ENDITEM)(0)(NOTRANS(.RE)STDPAR()redef(ENDITEM)(0)(CMT()))\
   )\
   ARG2\
   +ENDITEM()\





Messages sorted by: Reverse Date, Date, Thread, Author