help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to write a major mode?


From: Lute Kamstra
Subject: Re: How to write a major mode?
Date: Thu, 21 Aug 2003 20:24:38 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Arjan Bos <address@hidden> writes:

> Are there any pointers to documentation that show me how to program
> my own major mode? We created our own language with antlr, and of
> course we want it font-locked and indented automatically from within
> emacs.
>
> 1) Which functions do I need to create?
> 2) Are there any elisp docs out there that could help me with those
> function?
> 3) What is the best way to provide indenting and font-locking?

The Emacs Lisp Reference Manual has a chapter about writing major
modes.  If I recall correctly, http://www.emacswiki.org has some
useful information as well.

> Is there a small, well documented major-mode that I can use as a
> basis?

Take a look at some of the major modes that come with Emacs.  An
example of a small mode is text-mode (lisp/textmodes/text-mode.el).

  Lute.

-- 
(spook) => "militia benelux New World Order"
(insert-file-contents "~/.signature") => (error "`~/.signature' too rude")


reply via email to

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