From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: PHP mode in Emacs? Date: Mon, 01 May 2006 16:58:55 +0200 Message-ID: <4456222F.9030401@student.lu.se> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1146495574 3514 80.91.229.2 (1 May 2006 14:59:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 May 2006 14:59:34 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , Peter Heslin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 01 16:59:32 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaZrv-0000TN-75 for ged-emacs-devel@m.gmane.org; Mon, 01 May 2006 16:59:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaZru-0005cx-P8 for ged-emacs-devel@m.gmane.org; Mon, 01 May 2006 10:59:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaZrg-0005c2-Bn for emacs-devel@gnu.org; Mon, 01 May 2006 10:59:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaZre-0005b7-KJ for emacs-devel@gnu.org; Mon, 01 May 2006 10:59:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaZre-0005at-Bp for emacs-devel@gnu.org; Mon, 01 May 2006 10:59:06 -0400 Original-Received: from [81.228.8.164] (helo=pne-smtpout2-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FaZvT-0004fa-OQ for emacs-devel@gnu.org; Mon, 01 May 2006 11:03:04 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn2.hy.skanova.net (7.2.070) id 444497C5003230A2; Mon, 1 May 2006 16:59:01 +0200 User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) Original-To: emacs-devel@gnu.org In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53730 Archived-At: Lars Magne Ingebrigtsen wrote: > Richard Stallman 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 this > problem (multi-mode programming languages) is promising. > 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. 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.