From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jester@panix.com (Jesse Sheidlower) Newsgroups: gmane.emacs.help Subject: Indentation in derived modes? Date: 15 Oct 2003 10:56:44 -0400 Organization: Oxford University Press Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1066230117 19064 80.91.224.253 (15 Oct 2003 15:01:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 15:01:57 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 15 17:01:55 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 1A9n9v-0005aA-00 for ; Wed, 15 Oct 2003 17:01:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A9n92-00035i-08 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Oct 2003 11:01:00 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!panix!panix2.panix.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: panix2.panix.com Original-X-Trace: reader1.panix.com 1066229805 647 166.84.1.2 (15 Oct 2003 14:56:45 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Wed, 15 Oct 2003 14:56:45 +0000 (UTC) Original-Xref: shelby.stanford.edu gnu.emacs.help:117272 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:13201 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13201 I'm relatively new to the actual writing of Emacs Lisp, but I'd like to figure out whether it would be possible [i.e. for me] to get indentation working for a derived mode. I'm looking at various templating systems for embedding some kind of programming code within HTML, and would like Emacs to handle this as best as possible. It seems that basing it on an HTML-type mode, like psgml-mode (which seems only to indent if there's a DTD included, which may not always be the case if you're using templates) or html-helper-mode (does that indent, for that matter? I haven't used it), would be the way to start, and then adding to it some functionality for indenting the template's statements. Is that possible, or would I have to redo the entire indentation code to accommodate the possibility of embedded non-HTML statements? Is this a particularly difficult programming task? Any pointers to tutorials for writing such code would also be appreciated! There wasn't anything on it in a few of the things I've looked at already. Thanks very much. Jesse Sheidlower