all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to edit "mixed" (e.g. HTML/JavaScript) files?
Date: Thu, 08 Mar 2007 18:15:11 +0100	[thread overview]
Message-ID: <45F0449F.8010308@gmail.com> (raw)
In-Reply-To: <87k5xrhejs.fsf@localhorst.mine.nu>

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
>> buffer
> 
> 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*
> bad.

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	other threads:[~2007-03-08 17:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06 19:45 How to edit "mixed" (e.g. HTML/JavaScript) files? kj
2007-03-06 21:07 ` Lennart Borgman (gmail)
     [not found] ` <mailman.552.1173217248.7795.help-gnu-emacs@gnu.org>
2007-03-07 18:06   ` kj
2007-03-08  9:48   ` Hadron
2007-03-08 11:02     ` Hadron
2007-03-08 11:49     ` David Hansen
2007-03-08 13:27       ` Lennart Borgman (gmail)
2007-03-08 14:11         ` David Hansen
2007-03-08 16:06           ` Lennart Borgman (gmail)
2007-03-08 16:43             ` David Hansen
2007-03-08 17:15               ` Lennart Borgman (gmail) [this message]
2007-03-08 18:14                 ` David Hansen
     [not found]       ` <mailman.655.1173360456.7795.help-gnu-emacs@gnu.org>
2007-03-08 13:51         ` Hadron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45F0449F.8010308@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.