From: weber <hugows@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: auto-mode-alist, adding two modes
Date: Mon, 08 Oct 2007 15:37:56 -0000 [thread overview]
Message-ID: <1191857876.028299.269470@50g2000hsm.googlegroups.com> (raw)
In-Reply-To: <878x6dboyn.fsf@hillenius.net>
On Oct 8, 12:33 pm, Gijs Hillenius <gijs-nops...@hillenius.net> wrote:
> Hi
>
> 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.
>
> I've tried several more complicated incantations, but I'm not exactly
> fluent in lisp.
>
> Would appreciate a hint or two..
>
> Thx
>
> Gijs
>
> --
> The genius of our ruling class is that it has kept a majority of the
> people from ever questioning the inequity of a system where most people
> drudge along paying heavy taxes for which they get nothing in return.
> -- Gore Vidal
Maybe something like this would suffice?
(add-hook 'text-mode-hook '(lambda () (longlines-mode 1) (flyspell-
mode 1))
Just turn on those minor modes when a text-mode file shows up (txt
would be associated with text-mode like in your example)
HTH
weber
next prev parent reply other threads:[~2007-10-08 15:37 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 [this message]
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
[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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1191857876.028299.269470@50g2000hsm.googlegroups.com \
--to=hugows@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.