changeset 13919:30b732ff2de2

(sendmail-send-it): Make deletion of empty subject line work reliably.
author Richard M. Stallman <rms@gnu.org>
date Tue, 02 Jan 1996 08:57:04 +0000
parents 2f6eaea659da
children 3a5b5eeba5b5
files lisp/mail/sendmail.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Tue Jan 02 08:55:11 1996 +0000
+++ b/lisp/mail/sendmail.el	Tue Jan 02 08:57:04 1996 +0000
@@ -532,7 +532,11 @@
 	    ;; Don't send out a blank subject line
 	    (goto-char (point-min))
 	    (if (re-search-forward "^Subject:\\([ \t]*\n\\)+\\b" delimline t)
-		(replace-match ""))
+		(replace-match "")
+	      ;; This one matches a Subject just before the header delimiter.
+	      (if (and (re-search-forward "^Subject:\\([ \t]*\n\\)+" delimline t)
+		       (= (match-end 0) delimline))
+		  (replace-match "")))
 	    ;; Put the "From:" field in unless for some odd reason
 	    ;; they put one in themselves.
 	    (goto-char (point-min))