From: Tim X <timx@spamto.devnul.com>
Subject: Re: font-lock problems
Date: 20 Sep 2005 19:25:36 +1000 [thread overview]
Message-ID: <87wtlcrsz3.fsf@tiger.rapttech.com.au> (raw)
In-Reply-To: 87ll1tt51y.fsf@madamex.madamex.dk
Mads Jensen <spam@raptus.dk> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> 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!
next prev parent reply other threads:[~2005-09-20 9:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-18 10:50 font-lock problems Mads Jensen
2005-09-19 14:09 ` Stefan Monnier
2005-09-19 16:07 ` Mads Jensen
2005-09-20 9:25 ` Tim X [this message]
2005-09-21 2:34 ` Stefan Monnier
2005-09-19 22:39 ` rgb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wtlcrsz3.fsf@tiger.rapttech.com.au \
--to=timx@spamto.devnul.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).