From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: font-lock problems Date: 20 Sep 2005 19:25:36 +1000 Message-ID: <87wtlcrsz3.fsf@tiger.rapttech.com.au> References: <87y85uk5ub.fsf@madamex.madamex.dk> <87irwxxi82.fsf-monnier+gnu.emacs.help@gnu.org> <87ll1tt51y.fsf@madamex.madamex.dk> Reply-To: timx@spamto.devnul.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1127209878 4289 80.91.229.2 (20 Sep 2005 09:51:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Sep 2005 09:51:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 20 11:51:17 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EHem4-0004LE-0p for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Sep 2005 11:50:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EHem3-00036w-Fd for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Sep 2005 05:50:51 -0400 Original-Newsgroups: gnu.emacs.help Original-Lines: 33 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Original-NNTP-Posting-Host: ppp21-206.lns2.syd7.internode.on.net Original-X-Trace: duster.adelaide.on.net 1127208337 59.167.21.206 (20 Sep 2005 18:55:37 +0950) Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!news.xtra.co.nz!news-south.connect.com.au!duster.adelaide.on.net!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:134025 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:29584 Archived-At: Mads Jensen writes: > Stefan Monnier writes: > > > (font-lock-add-keywords > > > > Major modes shouldn't use font-lock-add-keywords for keywords that are > > always highlighted. It would only make sense for things which change > > dynamically (i.e. very rare). > > How am I supposed to get the words colored ? I have more things to > colorize, but I hope that it'll be easier to make that after learning > how to colorize something in the first place. Someone once pointed me to > (info "(elisp)Face foreground") (or something like that), which wasn't > of any help to me, as I see it. > -- Use the source Luke! Have a look at a simple mode to get the best way to do it. I found sql.el (part of the emacs distribution) to be very straight forward and gave me everything I needed in creating a very basic mode. Unfortunately that was a few years backa nd I've since stopped using the mode I created and cannot find its original source. However, I do remember sql.el put me in the right direction on things like font-locking, the use of the syntax table, handling of comments and different comment styles etc. Tim -- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!