diff options
Diffstat (limited to 'lisp/outline.el')
-rw-r--r-- | lisp/outline.el | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/outline.el b/lisp/outline.el index 58383fae97e..40340e10f42 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -187,12 +187,12 @@ in the file it applies to." :group 'outlines) (defface outline-4 - '((t :inherit font-lock-builtin-face)) + '((t :inherit font-lock-comment-face)) "Level 4." :group 'outlines) (defface outline-5 - '((t :inherit font-lock-comment-face)) + '((t :inherit font-lock-type-face)) "Level 5." :group 'outlines) @@ -202,7 +202,7 @@ in the file it applies to." :group 'outlines) (defface outline-7 - '((t :inherit font-lock-type-face)) + '((t :inherit font-lock-builtin-face)) "Level 7." :group 'outlines) @@ -215,8 +215,8 @@ in the file it applies to." [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 @@ in the file it applies to." (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.") @@ -973,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))) |