From 152bad9d9f5d4257129c67e19014cc436c31aba4 Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Fri, 15 Aug 2008 20:46:12 +0000 Subject: [PATCH] New procedure MAKE-INITIALIZED-MAIL-BUFFER creates a mail buffer and initializes it with a user-supplied initialization procedure, after it is created or after confirmation to discard the contents of any existing mail buffer. --- v7/src/edwin/edwin.pkg | 3 ++- v7/src/edwin/sendmail.scm | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/v7/src/edwin/edwin.pkg b/v7/src/edwin/edwin.pkg index 8f7732b26..39715ad77 100644 --- a/v7/src/edwin/edwin.pkg +++ b/v7/src/edwin/edwin.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: edwin.pkg,v 1.309 2008/08/11 22:48:50 riastradh Exp $ +$Id: edwin.pkg,v 1.310 2008/08/15 20:46:12 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -1569,6 +1569,7 @@ USA. mail-position-on-cc-field mail-setup mailer-version-string + make-initialized-mail-buffer make-mail-buffer prepare-mail-buffer-for-sending random-mime-boundary-string diff --git a/v7/src/edwin/sendmail.scm b/v7/src/edwin/sendmail.scm index 3ef0ff49e..22cc78259 100644 --- a/v7/src/edwin/sendmail.scm +++ b/v7/src/edwin/sendmail.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: sendmail.scm,v 1.98 2008/08/11 22:48:50 riastradh Exp $ +$Id: sendmail.scm,v 1.99 2008/08/15 20:46:12 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -258,6 +258,13 @@ is inserted." (define (make-mail-buffer headers reply-buffer #!optional selector handle-previous buffer-name mode) + (make-initialized-mail-buffer headers reply-buffer + (lambda (buffer) buffer unspecific) + selector handle-previous buffer-name mode)) + +(define (make-initialized-mail-buffer headers reply-buffer initializer + #!optional selector handle-previous + buffer-name mode) (let ((selector (if (default-object? selector) #f selector)) (handle-previous (if (default-object? handle-previous) @@ -277,6 +284,7 @@ is inserted." (default-homedir-pathname)) (setup-buffer-auto-save! buffer) (mail-setup buffer headers reply-buffer mode) + (initializer buffer) (if (and select? selector) (selector buffer)) buffer)))) (cond ((not buffer) -- 2.25.1