From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: PHP mode and mmm-mode Date: Sun, 31 Dec 2006 21:11:08 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1167617506 26847 80.91.229.12 (1 Jan 2007 02:11:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Jan 2007 02:11:46 +0000 (UTC) Cc: lennart.borgman.073@student.lu.se, shulman@math.uchicago.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 01 03:11:44 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H1CeN-0007cn-NZ for ged-emacs-devel@m.gmane.org; Mon, 01 Jan 2007 03:11:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1CeN-0003jW-3r for ged-emacs-devel@m.gmane.org; Sun, 31 Dec 2006 21:11:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H1Ce7-0003g4-2n for emacs-devel@gnu.org; Sun, 31 Dec 2006 21:11:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H1Ce6-0003fC-Fw for emacs-devel@gnu.org; Sun, 31 Dec 2006 21:11:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1Ce6-0003et-5v for emacs-devel@gnu.org; Sun, 31 Dec 2006 21:11:26 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H1Ce5-0008II-Vr for emacs-devel@gnu.org; Sun, 31 Dec 2006 21:11:26 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1H1Cdo-0000UE-3c; Sun, 31 Dec 2006 21:11:08 -0500 Original-To: Lars Magne Ingebrigtsen In-reply-to: (message from Lars Magne Ingebrigtsen on Tue, 02 May 2006 22:29:04 +0200) 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:64590 Archived-At: I am going through the old mail that I failed to deal with during the past year. Please forgive me for taking so long to respond. I just had a gross idea. Before calling any of the major-mode functions (in response to, say, `TAB'), you'd make all the text that's not in the current major mode invisible and intangible. Then each major mode function would believe there was nothing but its own type of text in the buffer. This is an interesting idea, but I think it won't work unless we rewrite major modes specifically to work with it. Making it invisible is pointless since it would only affect redisplay. Making it intangible would stop point from staying inside it. That could influence the various major modes. But I don't think it would influence them enough. The classic case of mixing two languages is Bison input. Would making everything except the C code intangible cause the C code to be handled and indented properly by CC mode? I tend to think the answer is no, but you could try it easily and see. > Perhaps an approach based on narrowing, or the creation of auxiliary > buffers, might work better; I haven't really explored these > possibilities. I think using narrowing and auxiliary buffers would both be less than optimal. When you program, you need to see the context. I agree with you that that isn't likely to work. Perhaps we could have a text property `language' and a variable `current-language'. If the `language' property of a character doesn't equal the value of `current-language', then the character would be treated syntactically as whitespace in syntax.c, and ignored _in the appropriate way_ by various other primitives.