# HG changeset patch # User Gerd Moellmann # Date 990012943 0 # Node ID ac83181a33d067f56c9cce7716ad6fdb9f69d31f # Parent 321506783c098dbcf35ddcf4cae1c709b3ed9496 (outline-font-lock-level): Remove the condition-case, test what outline-level returns instead, to ease debugging. diff -r 321506783c09 -r ac83181a33d0 lisp/textmodes/outline.el --- a/lisp/textmodes/outline.el Wed May 16 11:12:57 2001 +0000 +++ b/lisp/textmodes/outline.el Wed May 16 11:35:43 2001 +0000 @@ -1,6 +1,7 @@ ;;; outline.el --- outline mode commands for Emacs -;; Copyright (C) 1986, 93, 94, 95, 97, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 2001 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: outlines @@ -165,12 +166,11 @@ (let ((count 1)) (save-excursion (outline-back-to-heading t) - (condition-case nil - (while (not (bobp)) - (outline-up-heading-all 1) - (setq count (1+ count))) - (error))) - count)) + (while (and (not (bobp)) + (not (eq (funcall outline-level) 1))) + (outline-up-heading-all 1) + (setq count (1+ count))) + count))) (defvar outline-view-change-hook nil "Normal hook to be run after outline visibility changes.")