From: Richard M. Stallman Date: Sat, 20 Sep 1997 00:32:30 +0000 (+0000) Subject: (outline-up-heading): Avoid infinite loop at beginning of buffer. X-Git-Tag: emacs-20.2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=167bed8638b0c4463753f6100fe239cdfb5c80c8;p=emacs.git (outline-up-heading): Avoid infinite loop at beginning of buffer. --- diff --git a/lisp/textmodes/outline.el b/lisp/textmodes/outline.el index f12518c4051..f9717798b3d 100644 --- a/lisp/textmodes/outline.el +++ b/lisp/textmodes/outline.el @@ -620,7 +620,8 @@ With argument, move up ARG levels." (> arg 0) (not (bobp))) (let ((present-level (funcall outline-level))) - (while (not (< (funcall outline-level) present-level)) + (while (and (not (< (funcall outline-level) present-level)) + (not (bobp))) (outline-previous-visible-heading 1)) (setq arg (- arg 1)))))