unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "spamfilteraccount@gmail.com" <spamfilteraccount@gmail.com>
Subject: Re: Coloring window parts without content
Date: 4 Dec 2006 05:06:00 -0800	[thread overview]
Message-ID: <1165237560.313410.220820@79g2000cws.googlegroups.com> (raw)
In-Reply-To: <1164957369.124804.126330@n67g2000cwd.googlegroups.com>


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.") 
...

      parent reply	other threads:[~2006-12-04 13:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 10:48 Coloring window parts without content spamfilteraccount
2006-11-30  7:03 ` Dieter Wilhelm
     [not found] ` <mailman.1343.1164870209.2155.help-gnu-emacs@gnu.org>
2006-11-30  7:19   ` spamfilteraccount
2006-11-30  8:01     ` Dieter Wilhelm
     [not found]     ` <mailman.1345.1164873691.2155.help-gnu-emacs@gnu.org>
2006-11-30  8:17       ` spamfilteraccount
2006-12-01  0:39         ` Dieter Wilhelm
     [not found]         ` <mailman.1380.1164933580.2155.help-gnu-emacs@gnu.org>
2006-12-01  7:16           ` spamfilteraccount
2006-12-01  7:56             ` Dieter Wilhelm
     [not found]             ` <mailman.1390.1164959790.2155.help-gnu-emacs@gnu.org>
2006-12-01  8:09               ` spamfilteraccount
2006-12-01  8:22                 ` spamfilteraccount
2006-12-01 20:17                 ` Dieter Wilhelm
2006-12-04  9:54             ` Hadron Quark
2006-12-04 13:06             ` spamfilteraccount [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1165237560.313410.220820@79g2000cws.googlegroups.com \
    --to=spamfilteraccount@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).