unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Font Lock Problems
@ 2003-10-21 15:31 Phillip Lord
  2003-10-21 16:11 ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Phillip Lord @ 2003-10-21 15:31 UTC (permalink / raw)





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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-10-23 15:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-21 15:31 Font Lock Problems Phillip Lord
2003-10-21 16:11 ` Stefan Monnier
2003-10-21 17:08   ` Phillip Lord
2003-10-21 20:03     ` Stefan Monnier
2003-10-22 13:44       ` Phillip Lord
2003-10-22 14:10         ` Stefan Monnier
2003-10-22 15:09           ` Phillip Lord
2003-10-23 15:49       ` Phillip Lord
2003-10-23  5:18   ` Harald Maier
2003-10-23 14:21     ` Stefan Monnier
2003-10-23 15:53       ` Harald Maier

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