[Top][All Lists]

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

Re: How to edit "mixed" (e.g. HTML/JavaScript) files?

From: Lennart Borgman (gmail)
Subject: Re: How to edit "mixed" (e.g. HTML/JavaScript) files?
Date: Thu, 08 Mar 2007 18:15:11 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070221 Thunderbird/ Mnenhy/

David Hansen wrote:
On Thu, 08 Mar 2007 17:06:53 +0100 Lennart Borgman wrote:
This together with that a major mode wants to fontify the whole

There's `font-lock-dont-widen' (I think one of the glitches of
multi-mode is that it doesn't set this and syntactic fontification
in one mode may screws it in the other mode).

Ah, I see. Then perhaps this is the reason that no one has gotten it to work for nxml-mode and its derivates (like nxhtml-mode). Those modes must look at the whole buffer to be able to check against the DTD.

Maybe this can be fixed by using an extra indirect buffer for the DTD checking ...

Have a look at the multi-mode sources.  It's a relatively small,
clean coded and good commented package (no not by me ;).

I will.

I assume NXML mode won't be that happy too if you narrow it to one
region (or does it widen for it's syntax analysis?  Would probably
be even worse).

Yes, see above.

As far as I can see switching major mode might not be that bad if it
could be applied to a part of a buffer.

This always implies unnecessary refontification which IMHO is *very*

I can see your point. But I meant that if a mode where restricted to just a part of a buffer it would not be that bad. But there are no structures within Emacs to support that - or multi-mode might be a way to do it.

reply via email to

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