From 167bed8638b0c4463753f6100fe239cdfb5c80c8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 20 Sep 1997 00:32:30 +0000 Subject: [PATCH] (outline-up-heading): Avoid infinite loop at beginning of buffer. --- lisp/textmodes/outline.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))))) -- 2.39.5