[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How easy to create new major mode?
From: |
Friedrich Dominicus |
Subject: |
Re: How easy to create new major mode? |
Date: |
31 Jan 2003 18:02:58 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Native Windows TTY Support) |
"Tim Morley \(remove vegetable for email address\)" <tim@teamlog.turnip.com>
writes:
> Hi all.
>
> I believe the solution to my current emacs challenge will be to create a new
> major mode, albeit a very simple one. I'd be grateful for
> (a) confirmation that this is the way to attack the problem (or failing
> that, a better suggestion)
> and assuming this is indeed the case
> (b) guidance/URLs/code samples to help me put together what I
> need.
Well if you are interested in Emacs Lisp programming, have a look at
"Writing GNU Emacs extensions", there is a chapter in it on how to
develop you own major mode.
>
> What I would like to achieve is a customised system of syntax colouration,
> to help with reading through hundreds of lines of text. All I need is for
> lines starting with the word User to come up in, say, magenta, and lines
> starting with System in blue, with a default text colour of grey. (There are
> carriage-returns at the end of each line of text, so my keywords will always
> be at the beginning of a new line).
No for such simple thing an own major mode is over-kill.
Check the documentation for font-face, This will be enough for what
you are planning to do.
Regards
Friedrich