Mercurial > emacs
comparison lisp/textmodes/outline.el @ 37751:ac83181a33d0
(outline-font-lock-level): Remove the
condition-case, test what outline-level returns instead, to ease
debugging.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 16 May 2001 11:35:43 +0000 |
parents | 0117c95e5aa2 |
children | abf444fe5166 |
comparison
equal
deleted
inserted
replaced
37750:321506783c09 | 37751:ac83181a33d0 |
---|---|
1 ;;; outline.el --- outline mode commands for Emacs | 1 ;;; outline.el --- outline mode commands for Emacs |
2 | 2 |
3 ;; Copyright (C) 1986, 93, 94, 95, 97, 2000 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 2001 |
4 ;; Free Software Foundation, Inc. | |
4 | 5 |
5 ;; Maintainer: FSF | 6 ;; Maintainer: FSF |
6 ;; Keywords: outlines | 7 ;; Keywords: outlines |
7 | 8 |
8 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
163 | 164 |
164 (defun outline-font-lock-level () | 165 (defun outline-font-lock-level () |
165 (let ((count 1)) | 166 (let ((count 1)) |
166 (save-excursion | 167 (save-excursion |
167 (outline-back-to-heading t) | 168 (outline-back-to-heading t) |
168 (condition-case nil | 169 (while (and (not (bobp)) |
169 (while (not (bobp)) | 170 (not (eq (funcall outline-level) 1))) |
170 (outline-up-heading-all 1) | 171 (outline-up-heading-all 1) |
171 (setq count (1+ count))) | 172 (setq count (1+ count))) |
172 (error))) | 173 count))) |
173 count)) | |
174 | 174 |
175 (defvar outline-view-change-hook nil | 175 (defvar outline-view-change-hook nil |
176 "Normal hook to be run after outline visibility changes.") | 176 "Normal hook to be run after outline visibility changes.") |
177 | 177 |
178 ;;;###autoload | 178 ;;;###autoload |