diff lisp/mail/sendmail.el @ 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 88384034a5b4
children d9a95968edb8
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))