From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Specifying mode in file variables trouble Date: Tue, 23 Sep 2008 00:40:10 -0400 Message-ID: References: <48D44761.6000809@gmail.com> <87ljxny6n8.fsf@catnip.gol.com> <48D44C79.9020004@gmail.com> <48D63F30.8060102@gmail.com> <48D6E8FB.4070108@gmail.com> <48D79A25.7050000@gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1222144995 29487 80.91.229.12 (23 Sep 2008 04:43:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Sep 2008 04:43:15 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: "Lennart Borgman (gmail)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 23 06:44:05 2008 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 1Khzkq-0006rc-Oo for ged-emacs-devel@m.gmane.org; Tue, 23 Sep 2008 06:44:05 +0200 Original-Received: from localhost ([127.0.0.1]:48294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Khzjp-0004lm-4t for ged-emacs-devel@m.gmane.org; Tue, 23 Sep 2008 00:43:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Khzj6-0004Yj-EO for emacs-devel@gnu.org; Tue, 23 Sep 2008 00:42:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Khzj4-0004Y3-Ph for emacs-devel@gnu.org; Tue, 23 Sep 2008 00:42:15 -0400 Original-Received: from [199.232.76.173] (port=41631 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Khzj4-0004Xy-Kh for emacs-devel@gnu.org; Tue, 23 Sep 2008 00:42:14 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:45382) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Khzj4-0000MJ-8R for emacs-devel@gnu.org; Tue, 23 Sep 2008 00:42:14 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Khzh4-000686-Sc; Tue, 23 Sep 2008 00:40:10 -0400 In-reply-to: <48D79A25.7050000@gmail.com> (lennart.borgman@gmail.com) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:104051 Archived-At: For web template files (like PHP, JSP, Genshi etc) there are however often several major mode chunks involved. In for example a php file there may be chunks with these major modes - nxhtml-mode / html-mode - php-mode - css-mode - javascript-mode It seems to me that if PHP files are likely to contain these other things, it is good for Emacs to handle them automatically in PHP files. Here's one way: rename the basic PHP mode to `php-only-mode', and define `php-mode' as the mumamo mode to handle all of these. What do you think? Another variant is to make `php-mode' check for other languages, and call either `php-only-mode' or `php-mumamo-mode'. Or perhaps it could select among a larger variety of modes, depending on what combinations of languages are actually used in one file. If we don't do this, users can cope by adding explicit -*- specs. But that is inconvenient, so why not do this automatically?