all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: tyler <tyler.smith@mail.mcgill.ca>
To: Peter Dyballa <Peter_Dyballa@Web.DE>
Cc: help-gnu-emacs@gnu.org
Subject: Re: mode-specific paragraph-start
Date: Tue, 11 Dec 2007 20:24:39 -0400	[thread overview]
Message-ID: <20071212002439.GV28375@sedgenet> (raw)
In-Reply-To: <FF67B024-BA2E-425C-A687-067A1B48191F@Web.DE>

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

  reply	other threads:[~2007-12-12  0:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-11 16:31 mode-specific paragraph-start Tyler Smith
2007-12-11 19:00 ` Peter Dyballa
2007-12-12  0:24   ` tyler [this message]
2007-12-11 21:01     ` Peter Dyballa

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=20071212002439.GV28375@sedgenet \
    --to=tyler.smith@mail.mcgill.ca \
    --cc=Peter_Dyballa@Web.DE \
    --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.