From 7e69f9042902d11c5a63c433b43952fe032d3ab9 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 15 Oct 2006 19:13:44 +0000 Subject: [PATCH] * woman.el (woman2-format-paragraphs): Avoid infinite loop in case there is no terminating newline. --- lisp/woman.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/woman.el b/lisp/woman.el index 13fa3147487..b25a93d86a8 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -4121,7 +4121,11 @@ If `woman-nofill' is non-nil then indent without filling or adjusting." (eolp) (skip-syntax-forward " ") (setq woman-leave-blank-lines 1)) - (beginning-of-line) + ;; This shouldn't happen, but in case it does (e.g. for + ;; badly-formatted manfiles with no terminating newline), + ;; avoid an infinite loop. + (unless (and (eolp) (eobp)) + (beginning-of-line)) ;; If a single short line then just leave it. ;; This is necessary to preserve some table layouts. ;; PROBABLY NOT NECESSARY WITH SQUEEZE MODIFICATION !!!!! -- 2.39.2