[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mode-specific paragraph-start
From: |
tyler |
Subject: |
Re: mode-specific paragraph-start |
Date: |
Tue, 11 Dec 2007 20:24:39 -0400 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
On Tue, Dec 11, 2007 at 08:00:22PM +0100, Peter Dyballa wrote:
> Am 11.12.2007 um 17:31 schrieb Tyler Smith:
>> How do I set this variable so that it doesn't continuously grow?
> (if (not (exists your_new_variable))
> (setq your_new_variable to_your_desired_value)
> (setq paragraph-separate 'your_new_variable)
> (setq paragraph-start 'your_new_variable)
> )
>
Thanks. That didn't quite work, as exists is not a recognized function
for me. Also, I noticed that paragraph-start is global for mail-mode,
so any changes were 'permanent'. So this is what I have, which seems
to work so far:
(defun my-mail-mode-hook ()
(auto-fill-mode 1)
(abbrev-mode 1)
(fortune-to-signature)
(make-local-variable 'paragraph-start)
(if (not (boundp 'my_mail_paragraph))
(setq my_mail_paragraph (concat paragraph-separate "\\|.* wrote:$")))
(setq paragraph-separate my_mail_paragraph)
(setq paragraph-start my_mail_paragraph)
(set-fill-column 70))
(add-hook 'mail-mode-hook 'my-mail-mode-hook)
Any further suggestions welcome!
Cheers,
Tyler
--
Friends don't let friends send Word documents
http://www.nothingisreal.com/dfki/no-word