[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Font Lock Problems
From: |
Phillip Lord |
Subject: |
Font Lock Problems |
Date: |
21 Oct 2003 16:31:24 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93 |
I'm trying to add support for font lock to a small mode I have
written.
I am defining the font lock keywords like so...
(defvar language-speak-delimiter " >>>> ")
(font-lock-add-keywords
'language-speak-mode
(list (cons language-speak-delimiter font-lock-keyword-face)
(list (concat "\\(.*\\)" language-speak-delimiter) 1
font-lock-string-face)
(list (concat language-speak-delimiter "\\(.*\\)") 1
font-lock-type-face)))
(font-lock-add-keywords
'language-speak-mode
'(("#.*" 0 font-lock-comment-face)))
This works fine an does what I expect (that is for each line
highlights ">>>>" in one colour, all the text before it in another,
and all the text after it in another). But its does it very
lazily. In fact I have to call "font-lock-fontify-buffer" to get it to
do any fontification at all.
I'd like it to work a little bit more "on the fly". Can anyone tell me
why it is not?
Phil
- Font Lock Problems,
Phillip Lord <=
Re: Font Lock Problems, Harald Maier, 2003/10/23