On Thu, Jan 03, 2002 at 03:40:19PM +0100, giorgian wrote: > hi all, > > i defined the function my-text-mode in my .emacs file, to set all my > mail editing preferences; > > i put in my .muttrc the row: > set editor="emacs -f my-text-mode" > > but it doesn't work: mutt still opens my emacs in the default mode > (lisp interaction); i don't want to change the default mode, just to > use my-text-mode with mutt. > > any idea?
Here's the code from my .emacs file that does something similar. It
automatically goes into mail-mode (which is a superset of text-mode
with a few mail enhancements), auto-fill-mode, and moves point past
all the mail headers (since I set edit_headers in .muttrc).
;; Automatically go into mail-mode and auto-fill-mode if filename
;; starts with /tmp/mutt, and move past the mail headers.
(setq auto-mode-alist (append (list (cons "^\/tmp\/mutt" 'mail-mode))
auto-mode-alist))
(add-hook 'mail-mode-hook 'my-mail-mode-hook)
(defun my-mail-mode-hook ()
(auto-fill-mode)
(mail-text)
)
Walt
msg22205/pgp00000.pgp
Description: PGP signature
