summaryrefslogtreecommitdiff
path: root/lisp/woman.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-10-15 19:13:44 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-10-15 19:13:44 +0000
commit7e69f9042902d11c5a63c433b43952fe032d3ab9 (patch)
treefd6c7d85f16ffd36d7939dd2e8a12d0f7f4117e0 /lisp/woman.el
parentd0834a5ca044e97ae749a1517fa221cc977b0bd0 (diff)
downloademacs-7e69f9042902d11c5a63c433b43952fe032d3ab9.tar.gz
* woman.el (woman2-format-paragraphs): Avoid infinite loop in case
there is no terminating newline.
Diffstat (limited to 'lisp/woman.el')
-rw-r--r--lisp/woman.el6
1 files changed, 5 insertions, 1 deletions
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 !!!!!