From d1d912f83fb8e7efa86ab976dbd713e09ca25caf Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 5 May 1995 22:53:18 +0000 Subject: [PATCH] If "To:" header field not given to MAIL-SETUP, don't insert one. --- v7/src/edwin/sendmail.scm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/v7/src/edwin/sendmail.scm b/v7/src/edwin/sendmail.scm index 351e01591..75eb03509 100644 --- a/v7/src/edwin/sendmail.scm +++ b/v7/src/edwin/sendmail.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: sendmail.scm,v 1.27 1995/05/05 22:35:01 cph Exp $ +;;; $Id: sendmail.scm,v 1.28 1995/05/05 22:53:18 cph Exp $ ;;; ;;; Copyright (c) 1991-95 Massachusetts Institute of Technology ;;; @@ -281,21 +281,23 @@ is inserted." (insert-newline point) (mark-temporary! point)) (let ((given-header? - (lambda (name) + (lambda (name null-true?) (let ((header (list-search-positive headers (lambda (header) (string-ci=? (car header) name))))) (and header (cadr header) - (not (string-null? (cadr header)))))))) + (if null-true? + (string-null? (cadr header)) + (not (string-null? (cadr header))))))))) (set-buffer-point! buffer - (if (given-header? "to") - (buffer-end buffer) - (mail-position-on-field buffer "to"))) - (if (not (or (given-header? "to") - (given-header? "subject") - (given-header? "in-reply-to"))) + (if (given-header? "To" #t) + (mail-position-on-field buffer "To") + (buffer-end buffer))) + (if (not (or (given-header? "To" #f) + (given-header? "Subject" #f) + (given-header? "In-reply-to" #f))) (buffer-not-modified! buffer))) (event-distributor/invoke! (ref-variable mail-setup-hook buffer) buffer)) -- 2.25.1