Subject: 23.4; woman.el .nf blank \&

From: Kevin Ryde <[email-masked]>
Date: Thu, 31 May 2012 09:03:21 +1000

With the nf-blank.1 below,

    (woman-find-file "nf-blank.1")

produces

          Unfilled line 1.
          Unfilled line 2.

where I expected there would be a blank line in between, corresponding
to the \& line.

I think woman.el.nf-blank.diff below could correct this.

2012-05-29  Kevin Ryde  <[email-masked]>

	* woman.el (woman2-process-escapes): For .nf preserve newline
	following \&.  Fixes blank lines in perl pod2man "verbatim" blocks.

Perl pod2man makes such \& lines for blank lines in "verbatim" blocks
(usually sample code etc).  Dunno if it really needs to do that.  Maybe
it distinguishes line spacing from paragraph spacing in troff or
something.  In any case for woman I don't think a \& on the line should
remove it.

.TH FOO 1
.SH DESCRIPTION
.nf
Unfilled line 1.
\&
Unfilled line 2.
diff -u /so/woman/woman-24.el /so/woman/woman.el
--- /so/woman/woman-24.el	2012-05-18 14:59:04.000000000 +1000
+++ /so/woman/woman.el	2012-05-29 10:41:25.000000000 +1000
@@ -3931,7 +3931,9 @@
     (while (re-search-forward "\\\\[&|^]" to t)
       (woman-delete-match 0)
       ;; If on a line by itself, consume newline as well (Bug#3651).
-      (and (eq (char-before (match-beginning 0)) ?\n)
+      ;; But not in a .nf region, preserve all newlines in that case.
+      (and (not woman-nofill)
+	   (eq (char-before (match-beginning 0)) ?\n)
 	   (eq (char-after (match-beginning 0)) ?\n)
 	   (delete-char 1)))

Diff finished.  Tue May 29 10:41:30 2012

In GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-04-08 on biber, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure  '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

-- 
Even the white bits were black.