From d405bc15fc6e676f2c6af2afd06cf7c730f0f82d Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Mon, 21 Jan 2008 19:48:56 +0000 Subject: [PATCH] (outline-up-heading): Fix check for top level to avoid infinite looping in hide-other. --- lisp/ChangeLog | 5 +++++ lisp/outline.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b3e010f9b93..91ea02a2dbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-01-21 Martin Rudalics + + * outline.el (outline-up-heading): Fix check for top level to + avoid infinite looping in hide-other. + 2008-01-21 Thien-Thi Nguyen * vc.el (vc-process-sentinel): After calling the previous diff --git a/lisp/outline.el b/lisp/outline.el index f075a474810..40340e10f42 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -971,8 +971,8 @@ If INVISIBLE-OK is non-nil, also consider invisible lines." (or (eq last-command 'outline-up-heading) (push-mark))) (outline-back-to-heading invisible-ok) (let ((start-level (funcall outline-level))) - (if (eq start-level 1) - (error "Already at top level of the outline")) + (when (<= start-level 1) + (error "Already at top level of the outline")) (while (and (> start-level 1) (> arg 0) (not (bobp))) (let ((level start-level)) (while (not (or (< level start-level) (bobp))) -- 2.39.2