changeset 83792:97a6d10c46db

(outline-font-lock-levels): Comment out unused var. (outline-font-lock-face): Wrap around face list to handle any nesting depth gracefully.
author Daniel Pfeiffer <occitan@esperanto.org>
date Thu, 30 Aug 2007 21:39:20 +0000
parents cf51047dc34c
children ea73bdd7ce55
files lisp/outline.el
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/outline.el	Thu Aug 30 19:58:28 2007 +0000
+++ b/lisp/outline.el	Thu Aug 30 21:39:20 2007 +0000
@@ -215,8 +215,8 @@
   [outline-1 outline-2 outline-3 outline-4
    outline-5 outline-6 outline-7 outline-8])
 
-(defvar outline-font-lock-levels nil)
-(make-variable-buffer-local 'outline-font-lock-levels)
+;; (defvar outline-font-lock-levels nil)
+;; (make-variable-buffer-local 'outline-font-lock-levels)
 
 (defun outline-font-lock-face ()
   ;; (save-excursion
@@ -241,9 +241,7 @@
   (save-excursion
     (goto-char (match-beginning 0))
     (looking-at outline-regexp)
-    (condition-case nil
-	(aref outline-font-lock-faces (1- (funcall outline-level)))
-      (error font-lock-warning-face))))
+    (aref outline-font-lock-faces (% (1- (funcall outline-level)) (length outline-font-lock-faces)))))
 
 (defvar outline-view-change-hook nil
   "Normal hook to be run after outline visibility changes.")