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

Re: Emacs HTML modes



On 19/01/02 Manoj Srivastava did speaketh:

> 	Yes. Font-lock variables not being picked up by psgml. Font
>  lock vars are semi static, SGML tags are created by parsing
>  the DTDs. Hence, psgml does not use font lock (making sure the
>  keywords were sane would be hard for SGML/XML). Hence, psgml does its
>  own keyword highlighting.

    I'm just learning about how font-lock works, so I'll take your word for
it. ;-) 

> 	Since the keywords are highlighted, and one can chose the
>  highlight color, I think this is not a major nit (a minor aesthetic
>  consideration, in my opinion, YMMV)

    So, the proper way to handle this is to customize the psgml faces then?
I'm trying to reinstall psgml now, but my connection to the debian servers
isn't that great right now. I've really got to get away from rogers...

> 	It is a good SGML editor. It fails on the eye-candy aspect, a
>  bit, though, since it does not tie in to the generic font-lock
>  mechanism. Not an easy thing to change, though.
> 
> 	However, since I use various DTDs which include and exclude
>  other DTD snippets, having tags highlighted, and having an editor
>  that not only knows which other elements are valid in this context,
>  but also which attributes are legal for this element, is
>  indispensable. 
> 
> 	I'd take the context-sensitive knowledge over eye candy any
>  day ;-)

    Cool. I'll have to learn more about how to plug in an HTML DTD. Currently
I want to use it for that, and for handling DocBook and a couple of XML DTDs
that I wrote. DocBook is picked up nicely since I install it through a .deb
package, and it updates the catalog. For others, I'd like to just point it at
the DTD, since I get download one for HTML 4.0 from the W3C. 

> 	Even the top doctype and <html> tags were indented? I don';t
>  see that. Could you send me a minimal document that exhibits the
>  problem? 

    As soon as I can reinstall it, I'll make sure that I can reproduce it, and
send you a sample. I didn't have a doctype, but the <html> tags were indented,
yes. 

>  C-X h   mark-whole-buffer
>  ESC C-\ indent-region
> 
> 	Prettifies the buffer for me quite nicely.

    Well, it depends on the mode. In cperl-mode I found it messed up my code,
so I wrote a simpler one. I haven't looked at the code for indent-region, so I
don't know why it doesn't always work intuitively. 

    Mike

-- 
Michael P. Soulier <msoulier@mcss.mcmaster.ca>, GnuPG pub key: 5BC8BE08
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to Unix

Attachment: pgpGzek_0xd5C.pgp
Description: PGP signature


Reply to: