help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coloring window parts without content


From: address@hidden
Subject: Re: Coloring window parts without content
Date: 4 Dec 2006 05:06:00 -0800
User-agent: G2/1.0

spamfilteraccount@gmail.com wrote:
>
> BTW, the only thing the outline.el developers should do is to change
> font locking so that the face property includes the ending newline
> characters. If it is done then both the current coloring behavior and
> the one I proposed could be used (depending on face settings), so it
> could be the best of both worlds.

If anyone wants to try it here's a simple hack.

I replaced outline-font-lock-keywords with this definition (note the
\xa after outline-regexp, the newline character is also matched):

(defvar outline-font-lock-keywords
 ;; Highlight headings according to the level.
 '((eval . (list (concat "^" outline-regexp ".+\xa")
                 0 '(or (cdr (assq (outline-font-lock-level)
                                   '((1 . outline-1-face)
                                     (2 . outline-2-face)
                                     (3 . outline-3-face)
                                     (4 . outline-4-face)
                                     (5 . outline-5-face)
                                     (6 . outline-6-face)
                                     (7 . outline-7-face)
                                     (8 . outline-8-face))))
                        font-lock-warning-face)
                 nil t))))


It's for emacs21. You have to define your own faces to use it:

(defface outline-1-face
  '((t (:background "lightsteelblue1")))
  "Outline face for level 1.") 
...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]