emacs-devel
[Top][All Lists]
Advanced

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

Re: new buffer - should its mode reflect its name when the name matches


From: Mathias Dahl
Subject: Re: new buffer - should its mode reflect its name when the name matches auto-mode-alist?
Date: Wed, 23 Sep 2009 22:50:42 +0200

I would like this behaviour too. From time to time I also do this and
it is a tiny annoyance that I have to save the file and then revert it
to get the default mode loaded. Of course I sometimes enable the mode
manually as well but for some files I do not always know the mode
name.

On Tue, Sep 22, 2009 at 5:07 PM, Drew Adams <address@hidden> wrote:
>> > Haven't thought about this before, but I wonder if the mode
>> > should respect auto-mode-alist when you create a new buffer?
>> > There's no doubt a good reason or
>> > two why we don't do this - just wondering.
>> >
>> > E.g. `C-x b foo.el', where there is no existing buffer
>> > foo.el. The mode is
>> > Fundamental; should it be Emacs-Lisp instead?
>> >
>> > (I realize that a new buffer need not be intended to be
>> > saved as a file.)
>> >
>>
>> As an end-user and not having contributed anything to Emacs myself, I
>> would expect the buffer to "respect" auto-mode-alist, i.e. set the
>> mode depending on the buffer name. However, I think the default
>> behavior when creating buffers non-interactively should *not* respect
>> auto-mode-alist.
>
> Yes, I meant interactively only, but should have made that clear. Thx.
>
>
>
>




reply via email to

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