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

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

Re: Font-Locking for Allout Mode


From: Stephen Berman
Subject: Re: Font-Locking for Allout Mode
Date: Sun, 11 Mar 2007 16:07:15 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

On Sat, 10 Mar 2007 00:34:26 +0100 Stephen Berman
<address@hidden> wrote: 

> The proper adaptation should be the following, right?

Wrong, but how about this?

(defvar srb-allout-font-lock-keywords
  '((eval . (list (concat "^\\(?:" allout-regexp "\\).+")
                  0 '(cond ((= (allout-depth) 1)
                            font-lock-function-name-face)
                           ((= (allout-depth) 2)
                            font-lock-variable-name-face)
                           ((= (allout-depth) 3)
                            font-lock-keyword-face)
                           ((= (allout-depth) 4)
                            font-lock-builtin-face)
                           ((= (allout-depth) 5)
                            font-lock-comment-face)
                           ((= (allout-depth) 6)
                            font-lock-constant-face)
                           ((= (allout-depth) 7)
                            font-lock-type-face)
                           ((= (allout-depth) 8)
                            font-lock-string-face)
                           (t font-lock-warning-face))
                  t nil)))
  "Additional expressions to highlight in Allout mode.")

Steve Berman





reply via email to

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