summaryrefslogtreecommitdiff
path: root/lisp/woman.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-03-16 13:24:44 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-03-16 13:24:44 -0400
commitd5704d66b7244f17c7f3463b1bd821215ae54f46 (patch)
treee61bc3c0a6561d33c6ac4f81224117336a3a93b7 /lisp/woman.el
parentfade35ddda9f2491b64b1672ffe815e4573a7557 (diff)
downloademacs-d5704d66b7244f17c7f3463b1bd821215ae54f46.tar.gz
Woman parsing fix (Bug#5729).
* woman.el (woman2-process-escapes): Only consume the newline if the filler character is on a line by itself (Bug#5729).
Diffstat (limited to 'lisp/woman.el')
-rw-r--r--lisp/woman.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/woman.el b/lisp/woman.el
index b365126ecb9..79d6d84aff1 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -3876,10 +3876,14 @@ Optional argument NUMERIC, if non-nil, means the argument is numeric."
;; The first two cases below could be merged (maybe)!
(let ((from (point)))
;; Discard zero width filler character used to hide leading dots
- ;; and zero width characters. If on a line by itself, consume the
- ;; newline as well, as this may interfere with (Bug#3651).
- (while (re-search-forward "\\\\[&|^]\n?" to t)
- (woman-delete-match 0))
+ ;; and zero width characters.
+ (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)
+ (eq (char-after (match-beginning 0)) ?\n)
+ (delete-char 1)))
+
(goto-char from)
;; Interrupt text processing -- CONTINUE current text with the
;; next text line (after any control lines, unless processing to