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: Wed, 24 Sep 2008 09:47:17 -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> <48D8BB40.6060806@gmail.com> <48D954F9.4010302@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 1222264179 31588 80.91.229.12 (24 Sep 2008 13:49:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Sep 2008 13:49:39 +0000 (UTC) Cc: dmhouse@gmail.com, monnier@iro.umontreal.ca, aaron.s.hawley@gmail.com, emacs-devel@gnu.org To: "Lennart Borgman (gmail)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 24 15:50:33 2008 connect(): Connection refused 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 1KiUlE-0001Yg-DA for ged-emacs-devel@m.gmane.org; Wed, 24 Sep 2008 15:50:32 +0200 Original-Received: from localhost ([127.0.0.1]:38697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiUkC-0006NQ-Hh for ged-emacs-devel@m.gmane.org; Wed, 24 Sep 2008 09:49:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KiUk8-0006Mt-PX for emacs-devel@gnu.org; Wed, 24 Sep 2008 09:49:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KiUk7-0006MB-AT for emacs-devel@gnu.org; Wed, 24 Sep 2008 09:49:23 -0400 Original-Received: from [199.232.76.173] (port=48551 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiUk7-0006M8-3z for emacs-devel@gnu.org; Wed, 24 Sep 2008 09:49:23 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:48552) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KiUk6-00086v-MX for emacs-devel@gnu.org; Wed, 24 Sep 2008 09:49:22 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KiUi5-0004DQ-5T; Wed, 24 Sep 2008 09:47:17 -0400 In-reply-to: <48D954F9.4010302@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:104094 Archived-At: > Here's the scenario: the user visits a file called foo.php which > contains code in various languages. How do you propose for Emacs > to pick the right major mode? I propose that Emacs uses the same mechanism as today. That means that the order of the entries in `auto-mode-alist' is used. Sorry, that is just a part of the answer. If you propose to do this using auto-mode-alist, what are the items you think should be in auto-mode-alist? And in what order? But I want to give the user control over the order in `auto-mode-alist'. When we figure out precisely what we would DO with `auto-mode-alist', we could begin to think about whether such control is useful. > * Always call `php-mode', and define `php-mode' using mumamo to handle > all the languages that can be in a PHP file. > > * Always call `php-mode', and define `php-mode' to handle all the > languages that are found in this PHP file. I think the only reasonable way to do it is to use mumamo. (Maybe CEDET can change that in the future, but I rather think that CEDET and mumamo should cooperate.) If that means using the first of my proposals, that only requires one item in `auto-mode-alist', so there is no issue about the order of them.