# HG changeset patch # User Chong Yidong # Date 1160939624 0 # Node ID 959e3f79c94d81d1220c587dc0b28f65ef776474 # Parent 052270c7f73dd9ef5ff7846ec3e73c81e1841561 * woman.el (woman2-format-paragraphs): Avoid infinite loop in case there is no terminating newline. diff -r 052270c7f73d -r 959e3f79c94d lisp/woman.el --- a/lisp/woman.el Sun Oct 15 04:19:49 2006 +0000 +++ b/lisp/woman.el Sun Oct 15 19:13:44 2006 +0000 @@ -4121,7 +4121,11 @@ (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 !!!!!