From: Chris Hanson Date: Fri, 5 May 1995 23:15:47 +0000 (+0000) Subject: Change definition of MAIL-INSERT-FIELD to make it more general. X-Git-Tag: 20090517-FFI~6337 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4ef3e49b220bab1cc6019c7f963ea7439d50eb6a;p=mit-scheme.git Change definition of MAIL-INSERT-FIELD to make it more general. --- diff --git a/v7/src/edwin/sendmail.scm b/v7/src/edwin/sendmail.scm index 75eb03509..e901ef0fe 100644 --- a/v7/src/edwin/sendmail.scm +++ b/v7/src/edwin/sendmail.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: sendmail.scm,v 1.28 1995/05/05 22:53:18 cph Exp $ +;;; $Id: sendmail.scm,v 1.29 1995/05/05 23:15:47 cph Exp $ ;;; ;;; Copyright (c) 1991-95 Massachusetts Institute of Technology ;;; @@ -427,17 +427,18 @@ C-c C-q mail-fill-yanked-message (fill what was yanked)." (define (mail-insert-field mark field) (let ((mark (mark-left-inserting-copy mark))) - (guarantee-newline mark) + (if (not (line-start? mark)) + (let ((ls (line-start mark 1 #f))) + (if ls + (move-mark-to! mark ls) + (begin + (move-mark-to! mark (line-end mark 0)) + (insert-newline mark))))) (insert-string field mark) (insert-string ": " mark) - (if (line-end? mark) - (begin - (mark-temporary! mark) - mark) - (begin - (insert-newline mark) - (mark-temporary! mark) - (mark-1+ mark))))) + (insert-newline mark) + (mark-temporary! mark) + (mark-1+ mark))) (define (mail-field-end! header-start header-end field) (or (mail-field-end header-start header-end field)