[Top][All Lists]

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

Re: web-mode.el

From: Dmitry Gutov
Subject: Re: web-mode.el
Date: Thu, 14 Jun 2012 04:33:01 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

Lennart Borgman <address@hidden> writes:

> On Wed, Jun 13, 2012 at 12:37 PM, Dmitry Gutov <address@hidden> wrote:
>> Hi Chong,
>>> Thanks, this looks interesting. The problem with nXhtml mode (and
>>> php-mode) is that we've had a hell of a time trying to get the copyright
>>> assignments to get them incorporated into Emacs, and at this point I've
>>> given up.
>> Is there a particular reason that multi-mode is not in the list?
>> http://www.loveshack.ukfsn.org/emacs/multi-mode.el
>> I reviewed the packages dealing with this problem recently, and this one
>> looks most well-written, if probably outdated.
>> And if we believe the copyright notice, copyright assignments are
>> already in place. Provided it's a viable candidate, I might see what I
>> can do to bring it up-to-date.
> Please see my comments about mumamo.el. It is not possible to write
> something that works for all cases with the current Emacs. nXhtml
> includes a rather large test-suite where you can see some of the
> problems. It should be rather easy to change this test suite to run
> with for example multi-mode.el. If you do that I think you will get a
> better view of what works and what does not work.

I'll look at the tests, thanks.

> However it might not be worth the trouble. The real problem lies in
> the Emacs C core. Parsing functions can currently not be stopped from
> parsing things outside of the major mode chunk they belong too.
> (mumamo.el goes a long way to try to address this problems as far as
> possible. That makes the code quite complicated. A rewrite of the C
> core makes things very simple. In addition to this rewrite of the
> scheduling functions to add suitable tools for handling chunk finding
> might be necessary, but that is much simpler.)=C2=A7

From what I know, mmm-mode counteracts this problem effectively enough,
narrowing buffer to chunks during fontification, binding
font-lock-dont-widen to t, etc.
I'm also using narrowing during indentation, but some modes (like js)
use (widen) in indent-line-function. It should be somewhat fixable by
applying and removing syntax-table text property to text before the
chunk, but may make things even slower.

Anyway, you've seen the list of my immediate gripes about how MuMaMo
works for ERB, and I'm inclined to fault chunk detection and indentation
logic in your code rather than facilities provided by Emacs.

That's not to say that some sort of built-in support wouldn't help, of

-- Dmitry

reply via email to

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