comparison lisp/mail/sendmail.el @ 22997:7be798773f85

(mail-setup): After using `fill-region-as-paragraph' on a new address field, ensure that it ends with a newline.
author Richard M. Stallman <rms@gnu.org>
date Tue, 11 Aug 1998 12:17:42 +0000
parents 491a97002c82
children c42d28898577
comparison
equal deleted inserted replaced
22996:c76b7dd7a823 22997:7be798773f85
351 ;; on the assumption that mail-strip-quoted-names 351 ;; on the assumption that mail-strip-quoted-names
352 ;; has been called and has done so. 352 ;; has been called and has done so.
353 (let ((fill-prefix "\t") 353 (let ((fill-prefix "\t")
354 (address-start (point))) 354 (address-start (point)))
355 (insert to "\n") 355 (insert to "\n")
356 (fill-region-as-paragraph address-start (point-max))) 356 (fill-region-as-paragraph address-start (point-max))
357 (goto-char (point-max))
358 (unless (bolp)
359 (newline)))
357 (newline)) 360 (newline))
358 (if cc 361 (if cc
359 (let ((fill-prefix "\t") 362 (let ((fill-prefix "\t")
360 (address-start (progn (insert "CC: ") (point)))) 363 (address-start (progn (insert "CC: ") (point))))
361 (insert cc "\n") 364 (insert cc "\n")
362 (fill-region-as-paragraph address-start (point-max)))) 365 (fill-region-as-paragraph address-start (point-max))
366 (goto-char (point-max))
367 (unless (bolp)
368 (newline))))
363 (if in-reply-to 369 (if in-reply-to
364 (let ((fill-prefix "\t") 370 (let ((fill-prefix "\t")
365 (fill-column 78) 371 (fill-column 78)
366 (address-start (point))) 372 (address-start (point)))
367 (insert "In-reply-to: " in-reply-to "\n") 373 (insert "In-reply-to: " in-reply-to "\n")
368 (fill-region-as-paragraph address-start (point-max)))) 374 (fill-region-as-paragraph address-start (point-max))
375 (goto-char (point-max))
376 (unless (bolp)
377 (newline))))
369 (insert "Subject: " (or subject "") "\n") 378 (insert "Subject: " (or subject "") "\n")
370 (if mail-default-headers 379 (if mail-default-headers
371 (insert mail-default-headers)) 380 (insert mail-default-headers))
372 (if mail-default-reply-to 381 (if mail-default-reply-to
373 (insert "Reply-to: " mail-default-reply-to "\n")) 382 (insert "Reply-to: " mail-default-reply-to "\n"))