[Top][All Lists]

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

Re: major mode in new buffers

From: Harald Hanche-Olsen
Subject: Re: major mode in new buffers
Date: Tue, 30 Mar 2010 11:13:00 -0400 (EDT)

+ René Kyllingstad <address@hidden>:

> new buffers get default-major-mode.

Actually, according to the doc string that variable is obsolete.
You're supposed to use (the global value of) major-mode instead.

> I would find it more convenient if auto-mode-alist was used.
> Is there a disadvantage to that?

One obvious one (I think) is that auto-mode-alist is geared towards
filenames, not buffer names. I also admit I'd find it somewhat creepy
if the mode of a new buffer were to depend on the buffer name.

Couldn't you just bind the global value of major-mode to a function
which picks the mode based on the buffer name?

- Harald

reply via email to

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