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: How to write a major mode?
Date: 21 Aug 2003 19:23:18 +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: <3f45067d$0$153$1b62eedf@news.wanadoo.nl>
NNTP-Posting-Host: deer.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: sea.gmane.org 1061506550 28432 80.91.224.253 (21 Aug 2003 22:55:50 GMT)
X-Complaints-To: usenet@sea.gmane.org
NNTP-Posting-Date: Thu, 21 Aug 2003 22:55:50 +0000 (UTC)
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 22 00:55:48 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 19pyLM-0007i5-00
for ; Fri, 22 Aug 2003 00:55:48 +0200
Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org)
by monty-python.gnu.org with esmtp (Exim 4.20)
id 19pv3s-0004JP-KY
for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2003 15:25:32 -0400
Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!logbridge.uoregon.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news2.telebyte.nl!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: 32
Original-NNTP-Posting-Host: rpc71.cs.man.ac.uk
Original-X-Trace: wapping.cs.man.ac.uk 1061490198 28955 130.88.198.228 (21 Aug 2003
18:23:18 GMT)
Original-X-Complaints-To: news@wapping.cs.man.ac.uk
Original-NNTP-Posting-Date: Thu, 21 Aug 2003 18:23:18 +0000 (UTC)
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93
Original-Xref: shelby.stanford.edu gnu.emacs.help:116053
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:11961
X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11961
>>>>> "Arjan" == Arjan Bos writes:
Arjan> Hi all,
Arjan> Are there any pointers to documentation that show me how to
Arjan> program my own major mode? We created our own language with
Arjan> antlr, and of course we want it font-locked and indented
Arjan> automatically from within emacs.
Arjan> 1) Which functions do I need to create?
Arjan> 2) Are there any elisp docs out there that could help me with
Arjan> those
Arjan> function?
Arjan> 3) What is the best way to provide indenting and
Arjan> font-locking?
Arjan> Is there a small, well documented major-mode that I can use
Arjan> as a basis?
Arjan> These are a lot of questions. I hope I get answers to them
Arjan> all ;-)
There is a emacs lisp primer, and manual, which you can get from the
GNU sites. They are both fairly good. There is also, of course, of lot
of source, much of which is well documented which you can read.
In your case I think you want to take a look at "generic.el" and
"generic-x.el" which are designed for building small major modes, with
font locking, and indentation.
Phil