[Top][All Lists]

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

Re: Font Lock Problems

From: Phillip Lord
Subject: Re: Font Lock Problems
Date: 22 Oct 2003 14:44:33 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93

>>>>> "Stefan" == Stefan Monnier <> writes:

  >> Okay, thats fair enough. I've never done anything with the syntax
  >> table before, but I shall investigate.

  Stefan> Check out SampleMode in the emacswiki where it has an
  Stefan> example.


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

  Stefan> Have you turned font-lock-mode ON ?
  >> I presume so.

  Stefan> Well, what is the value of `font-lock-mode' ?

It's nil. This worried me, but I checked the value in other buffers
which appear to be font locked and it was likewise null there. 

  >> I am using global-font-lock-mode. Do I have to add something to
  >> my mode to provide support for font-lock? I'm currently defining
  >> my mode as a derived mode from text-mode.

  Stefan> Don't use `font-lock-add-keywords' when defining a major
  Stefan> mode.  See SampleMode for an example.

Yes, this looks good. I shall work with this. 

Thanks Stefan


reply via email to

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