[Top][All Lists]

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

Re: auto-mode-alist, adding two modes

From: Barry Margolin
Subject: Re: auto-mode-alist, adding two modes
Date: Mon, 08 Oct 2007 22:22:32 -0400
User-agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X)

In article 
 Joost Kremers <address@hidden> wrote:

> Gijs Hillenius wrote:
> > I would like to get emacs to use longlines-mode *and* flyspell-mode
> > for all files ending in .txt
> >
> > If I add this in my .emacs 
> >
> > (add-to-list 'auto-mode-alist '("\\.txt\\'" . longlines-mode ))
> >
> > followed by a similar line for flyspell, ignores the first, and uses
> > only the latter.
> 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.

Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

reply via email to

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