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

[PATCH] fix problem with blank lines in examples in documents

In man pages and zsh.pdf, blank lines in examples are causing
minor format problems.

As an example, see the example script in the description of the zle
standard widget "recursive-edit" (in zshzle.1), which looks like

	self-insert-ucase() {
	(1st blank line)
	integer stat
	(2nd blank line)

In "man zshzle", only the 1st part (before the 1st blank line) of
the example has the bold attribute. In zsh.pdf, section 18.6.6,
each blank line in the example is replaced by two blank lines.

The same problem exists in the example at the end of "ABBREVIATED
DYNAMIC REFERENCES TO DIRECTORIES" in zshcontrib (or 26.4.3 in

It seems that the blank line causes the yodl macro PARAGRAPH()
to be called even in the example() macro. The patch below may be
a possible fix. I've checked (with yodl 3.0) that, at least with
the current set of *.yo, the patch does not introduce any bad
side effects (manpages and zsh.texi generated with the patch have
no undesired diffs form those generated without it).

diff --git a/Doc/zman.yo b/Doc/zman.yo
index 73cc186..5050edb 100644
--- a/Doc/zman.yo
+++ b/Doc/zman.yo
@@ -174,9 +174,11 @@ def(itemiz)(1)(\
 COMMENT(--- special effects ---)
+  undef(PARAGRAPH)\
+  STDPAR()\
diff --git a/Doc/ztexi.yo b/Doc/ztexi.yo
index 6995677..e878345 100644
--- a/Doc/ztexi.yo
+++ b/Doc/ztexi.yo
@@ -225,9 +225,11 @@ def(nofill)(1)(\
+  undef(PARAGRAPH)\
   +NL()NOTRANS(@end example)\
+  STDPAR()\

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