From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tyler Newsgroups: gmane.emacs.help Subject: Re: mode-specific paragraph-start Date: Tue, 11 Dec 2007 20:24:39 -0400 Message-ID: <20071212002439.GV28375@sedgenet> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197404742 10577 80.91.229.12 (11 Dec 2007 20:25:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Dec 2007 20:25:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Peter Dyballa Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 11 21:25:50 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J2BfR-0004VL-0N for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Dec 2007 21:25:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2Bf9-00070V-4b for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Dec 2007 15:25:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2Bep-000709-Ib for help-gnu-emacs@gnu.org; Tue, 11 Dec 2007 15:24:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2Ben-0006zW-Uh for help-gnu-emacs@gnu.org; Tue, 11 Dec 2007 15:24:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2Ben-0006zE-Ou for help-gnu-emacs@gnu.org; Tue, 11 Dec 2007 15:24:45 -0500 Original-Received: from simmts12.bellnexxia.net ([206.47.199.141] helo=simmts12-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J2Ben-0006jn-Du for help-gnu-emacs@gnu.org; Tue, 11 Dec 2007 15:24:45 -0500 Original-Received: from simip10.srvr.bell.ca ([206.47.199.89]) by simmts12-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071211202444.ENFL25485.simmts12-srv.bellnexxia.net@simip10.srvr.bell.ca> for ; Tue, 11 Dec 2007 15:24:44 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj0KAByBXkeOsXqt/2dsb2JhbAA4gSI Original-Received: from hlfxns0149w-142177122173.ns.aliant.net (HELO blackbart.sedgenet) ([142.177.122.173]) by alconsout.srvr.bell.ca with ESMTP; 11 Dec 2007 15:22:56 -0500 Original-Received: from tyler by blackbart.sedgenet with local (Exim 4.68) (envelope-from ) id 1J2FOx-0004YB-AC; Tue, 11 Dec 2007 20:24:39 -0400 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50014 Archived-At: 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