From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: auto-mode-alist, adding two modes Date: 9 Oct 2007 11:01:21 GMT Message-ID: References: <878x6dboyn.fsf@hillenius.net> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1191930068 18723 80.91.229.12 (9 Oct 2007 11:41:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Oct 2007 11:41:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 09 13:41:06 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IfDST-0007In-I5 for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Oct 2007 13:41:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfDSO-0006kJ-4u for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Oct 2007 07:41:00 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-X-Trace: individual.net A2ry1W1geh+tw856msmkmQ8/Dpmnt6aJY+xWnr66Wsf27ps8hU Cancel-Lock: sha1:bhAui4pjVxUv6R97bRSAi2keQtM= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/0.9.8.1 (Linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:152751 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48255 Archived-At: Barry Margolin wrote: >> you should read the documentation of auto-mode-alist. it says quite clearly >> that it is a list for specifying *major* modes. both longline-mode and >> flyspell-mode are minor modes, and should therefore be specified in a >> different way. > > I don't think this is really that important. It's just an alist that > maps filename patterns to functions to call when loading the file into a > buffer. While this is intended to set the major mode, this is really > just a convention. Nothing really cares what the function does. still, i do believe it's better to follow the convention, especially given that there are other ways of achieving what the OP wants. note that with his solution, no major mode is set anymore for .txt files, probably not a desirable side-effect. and if the OP gets into the habit of specifying minor modes in this manner, who knows what kinds of problems it will cause in the future? problems that, because he's not following conventions, will be all the more difficult to track down. IMHO it's a useful (and otherwise harmless) convention, and unless you know exactly what you're doing, it's best to follow it. -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)