From: Martin Rudalics Date: Mon, 21 Jan 2008 19:48:56 +0000 (+0000) Subject: (outline-up-heading): Fix check for top level to X-Git-Tag: emacs-pretest-23.0.90~8476 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d405bc15fc6e676f2c6af2afd06cf7c730f0f82d;p=emacs.git (outline-up-heading): Fix check for top level to avoid infinite looping in hide-other. --- 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)))