From mboxrd@z Thu Jan 1 00:00:00 1970
Path: main.gmane.org!not-for-mail
From: Phillip Lord
Newsgroups: gmane.emacs.help
Subject: Re: Font Lock Problems
Date: 22 Oct 2003 14:44:33 +0100
Organization: Dept of Computer Science, University of Manchester, U.K.
Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Message-ID:
References:
NNTP-Posting-Host: deer.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: sea.gmane.org 1066832173 30042 80.91.224.253 (22 Oct 2003 14:16:13 GMT)
X-Complaints-To: usenet@sea.gmane.org
NNTP-Posting-Date: Wed, 22 Oct 2003 14:16:13 +0000 (UTC)
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 22 16:16:11 2003
Return-path:
Original-Received: from monty-python.gnu.org ([199.232.76.173])
by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian))
id 1ACJmU-0002Pz-00
for ; Wed, 22 Oct 2003 16:16:11 +0200
Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org)
by monty-python.gnu.org with esmtp (Exim 4.24)
id 1ACJmD-0007Iu-PM
for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Oct 2003 10:15:53 -0400
Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!news2.telebyte.nl!humbolt.nl.linux.org!news.nl.linux.org!zen.net.uk!130.88.203.18.MISMATCH!peernews.mcc.ac.uk!cs.man.ac.uk!not-for-mail
Original-Newsgroups: gnu.emacs.help
Original-Lines: 37
Original-NNTP-Posting-Host: rpc71.cs.man.ac.uk
Original-X-Trace: wapping.cs.man.ac.uk 1066830273 18382 130.88.198.228 (22 Oct 2003
13:44:33 GMT)
Original-X-Complaints-To: news@wapping.cs.man.ac.uk
Original-NNTP-Posting-Date: Wed, 22 Oct 2003 13:44:33 +0000 (UTC)
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93
Original-Xref: shelby.stanford.edu gnu.emacs.help:117526
Original-To: help-gnu-emacs@gnu.org
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Users list for the GNU Emacs text editor
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Xref: main.gmane.org gmane.emacs.help:13457
X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13457
>>>>> "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.
Okay.
>>>> 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
Phil