summaryrefslogtreecommitdiff
path: root/lisp/woman.el
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2012-07-07 18:10:47 +0800
committerChong Yidong <cyd@gnu.org>2012-07-07 18:10:47 +0800
commit87a92845e76bbf47a94fe7900313ace2979d5ec3 (patch)
tree3174c963d5df7c65300d78a27d51cf35cda025e5 /lisp/woman.el
parentf0ecdfeaae605c0dfa115925a38f285641a69230 (diff)
downloademacs-87a92845e76bbf47a94fe7900313ace2979d5ec3.tar.gz
* woman.el (woman2-process-escapes): Handle nofill regions.
Fixes: debbugs:11591
Diffstat (limited to 'lisp/woman.el')
-rw-r--r--lisp/woman.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/woman.el b/lisp/woman.el
index 4767b062335..32aee3baff8 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -3932,7 +3932,9 @@ Optional argument NUMERIC, if non-nil, means the argument is numeric."
(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)))