From: Joost Kremers <joostkremers@yahoo.com>
To: help-gnu-emacs@gnu.org
Subject: Re: auto-mode-alist, adding two modes
Date: 9 Oct 2007 11:01:21 GMT [thread overview]
Message-ID: <slrnfgmnqm.5bc.joostkremers@j.kremers4.news.arnhem.chello.nl> (raw)
In-Reply-To: barmar-5CC6E9.22223208102007@comcast.dca.giganews.com
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)
next prev parent reply other threads:[~2007-10-09 11:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 15:33 auto-mode-alist, adding two modes Gijs Hillenius
2007-10-08 15:37 ` weber
2007-10-08 16:01 ` Joost Kremers
2007-10-08 17:55 ` Gijs Hillenius
2007-10-08 18:20 ` Joost Kremers
2007-10-09 2:22 ` Barry Margolin
2007-10-09 11:01 ` Joost Kremers [this message]
2007-10-09 21:34 ` Edward O'Connor
[not found] ` <mailman.1891.1191965685.18990.help-gnu-emacs@gnu.org>
2007-10-10 23:47 ` Johan Bockgård
2007-10-12 5:37 ` Gijs Hillenius
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=slrnfgmnqm.5bc.joostkremers@j.kremers4.news.arnhem.chello.nl \
--to=joostkremers@yahoo.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).