From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.devel Subject: Re: major mode in new buffers Date: Tue, 30 Mar 2010 11:13:00 -0400 (EDT) Message-ID: <20100330.111300.426382691.hanche@math.ntnu.no> References: <2f8988ff1003300457w38ee4bf0h259cd7a7187298e0@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1269962025 14054 80.91.229.12 (30 Mar 2010 15:13:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Mar 2010 15:13:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 30 17:13:38 2010 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.69) (envelope-from ) id 1Nwd8L-0003z7-Ij for ged-emacs-devel@m.gmane.org; Tue, 30 Mar 2010 17:13:37 +0200 Original-Received: from localhost ([127.0.0.1]:52492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwd8K-00062a-T3 for ged-emacs-devel@m.gmane.org; Tue, 30 Mar 2010 11:13:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nwd7t-0005eE-MP for emacs-devel@gnu.org; Tue, 30 Mar 2010 11:13:09 -0400 Original-Received: from [140.186.70.92] (port=46664 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwd7s-0005bm-1d for emacs-devel@gnu.org; Tue, 30 Mar 2010 11:13:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nwd7q-0008Be-OZ for emacs-devel@gnu.org; Tue, 30 Mar 2010 11:13:07 -0400 Original-Received: from anne.math.ntnu.no ([129.241.15.150]:64361) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Nwd7q-0008B2-CG for emacs-devel@gnu.org; Tue, 30 Mar 2010 11:13:06 -0400 Original-Received: (qmail 19811 invoked from network); 30 Mar 2010 15:13:02 -0000 Original-Received: from gauss.math.ntnu.no (HELO localhost) (hanche@129.241.15.102) by anne.math.ntnu.no with ESMTPA; 30 Mar 2010 15:13:02 -0000 In-Reply-To: <2f8988ff1003300457w38ee4bf0h259cd7a7187298e0@mail.gmail.com> X-URL: http://www.math.ntnu.no/~hanche/ X-Mailer: Mew version 6.3.50 on Emacs 24.0.50 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:122915 Archived-At: + René Kyllingstad : > 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