help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: auto-mode-alist, adding two modes


From: Joost Kremers
Subject: Re: auto-mode-alist, adding two modes
Date: 9 Oct 2007 11:01:21 GMT
User-agent: slrn/0.9.8.1 (Linux)

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                                      address@hidden
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


reply via email to

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