[Zope] ZOPE, Xemacs, html-mode, & indentation

jiva@devware.com jiva@devware.com
Wed, 7 Jun 2000 01:03:06 -0700


Bob:

You are 100% correct.  I didn't want to write a DTD for dtml (though
this is probably the "right" solution) so instead I went searching for 
other options.  Here's what I found:

If you use hm--html-mode, there's a variable called:
hm--html-tag-name-alist where I added some definitions for
dtml. (basically I just added dtml-in and a multi tag and dtml-var as
a single tag).  Then, I set up xemacs to use hm--html-mode for the
dtml stuff.  To do the indentation with hm--html-mode then, you have
to hilight the area you want indented, then hit TAB.  Problem solved!
And now I have beautifully indented dtml docs!!

If anyone wants a copy of what I put in my .emacs for the
tag-name-alist.  Let me know.

On Mon, Jun 05, 2000 at 06:31:41PM -0700, Bob Finch wrote:
> >>>>> "jiva" == jiva@devware.com <jiva@devware.com> writes:
> 
>     jiva> I am using XEmacs with it's html mode to work on some dtml code.  I
>     jiva> can get it to switch to html mode easily for the dtml stuff even
>     jiva> though I'm not naming my files with .html extensions by doing: M-x
>     jiva> html-mode  Unfortunately, no matter what I do, I can't get it to do
>     jiva> it's indentation on anything unless it's actually *started* in the
>     jiva> html-mode (ie: I do a new file with a .html extension)
> 
> I just ran into the same problem.  It appears that XEmacs html-mode
> parses the html in the buffer.  If it doesn't parse correctly, the
> indentation stuff doesn't work.  To see this, try editing something
> without any dtml in it -- indentation should work fine.  As soon as
> you add <dtml-var standard_html_header> at the top, indentation stops
> working. 
> 
> I guess the fix is to write a dtml DTD for XEmacs html-mode.  Has
> anyone already done this?
> 

-- 
The trouble with a kitten is that
When it grows up, it's always a cat
		-- Ogden Nash.