|
From: | Lennart Borgman |
Subject: | Re: PHP mode in Emacs? |
Date: | Mon, 01 May 2006 16:58:55 +0200 |
User-agent: | Thunderbird 1.5.0.2 (Windows/20060308) |
Lars Magne Ingebrigtsen wrote:
I do not know whether it has been discussed, but it seems to me there are currently unfortunately problems with this approach. I believe a number of things have to be addressed in Emacs before something like mm-mode can work for all modes. But I am not sure, it is quite complex. Below are however my thoughts about it.Richard Stallman <address@hidden> writes:I do not know PHP. All I can say is that I would welcome addition of a good PHP mode.Has the inclusion of mmm-mode (written by Michael Shulman and others) been discussed previously? It looks like the approach taken to thisproblem (multi-mode programming languages) is promising.
I think the idea of having different modes in different regions in a buffer is very good. So I tried it with nxml-mode (actually nxhtml-mode), but without any real success. Dean Scarff says he had some success, but still problems with that nxml-mode re-fontifies region that has another submode (see http://www.emacswiki.org/cgi-bin/wiki/NxmlModeForXHTML). This is also what I found.
I can really see no way to stop different modes from stomping at each other with mmm-mode. And I can not see that it is possible to do that with Emacs (even the CVS version) today. To do that there must be some way to tell a mode only to care about a region or a list of regions and I can not see how to do that now. (Maybe some more things are required, but this is a minimum.)
For the moment I would therefore suggest either html-script.el or html-inlined.el. They use narrowing and changes the buffers major mode temporarily during narrowing.
For the future I would sugges investigating ways to do what mm-mode tries to do.
[Prev in Thread] | Current Thread | [Next in Thread] |