[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Auto enable text-mode when editing email (from mutt)
From: |
Teemu Likonen |
Subject: |
Re: Auto enable text-mode when editing email (from mutt) |
Date: |
Thu, 19 Feb 2009 23:35:24 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
On 2009-02-19 12:45 (-0800), TheLonelyStar wrote:
> I use emacs to edit my emails (from mutt). It is started with this
> line: /usr/bin/emacs -nw -q
>
> Now, editing emails in text-mode instead of fundamental mode would be
> much cooler! How can I make emacs got to text-mode when invoked from
> mutt?
Maybe you want to use mail-mode instead? This should work:
(add-to-list 'auto-mode-alist
'("\\`/tmp/mutt-[^/]+\\'" . mail-mode))
My suggestion for mail-mode settings:
(add-hook 'mail-mode-hook
'(lambda ()
(auto-fill-mode 1)
(set (make-local-variable 'tab-stop-list)
(number-sequence 4 100 4))
(setq indent-tabs-mode nil
fill-column 72)
(when (>= emacs-major-version 23)
(visual-line-mode 1))))