[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specifying mode in file variables trouble

From: Richard M. Stallman
Subject: Re: Specifying mode in file variables trouble
Date: Wed, 24 Sep 2008 09:47:17 -0400

    > 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]