From: Edward O'Connor <hober0@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: auto-mode-alist, adding two modes
Date: Tue, 09 Oct 2007 17:34:01 -0400 [thread overview]
Message-ID: <86d4vo2cs6.fsf@rakim.cfhp.org> (raw)
In-Reply-To: 878x6dboyn.fsf@hillenius.net
> I would like to get emacs to use longlines-mode *and* flyspell-mode
> for all files ending in .txt
You might want to define a derived mode in this sort of case.
Something like this should do the trick. Untested, of course.
(define-derived-mode gijs-text-mode text-mode "Gijs"
"Major mode for editing text files.")
(add-to-list 'auto-mode-alist '("\\.txt\\'" . gijs-text-mode))
(add-hook 'gijs-text-mode-hook 'longlines-mode)
(add-hook 'gijs-text-mode-hook 'flyspell-mode)
next prev parent reply other threads:[~2007-10-09 21:34 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
2007-10-09 21:34 ` Edward O'Connor [this message]
[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=86d4vo2cs6.fsf@rakim.cfhp.org \
--to=hober0@gmail.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).