]> git.eshelyaron.com Git - emacs.git/commitdiff
(sendmail-send-it): Make deletion of empty subject line work reliably.
authorRichard M. Stallman <rms@gnu.org>
Tue, 2 Jan 1996 08:57:04 +0000 (08:57 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 2 Jan 1996 08:57:04 +0000 (08:57 +0000)
lisp/mail/sendmail.el

index dc7b848ca7341256018ef1e4327c4167d70ddf35..a5fdc8d5d47cba1c49012ff75c6cb101351d2621 100644 (file)
@@ -532,7 +532,11 @@ the user from the mailer."
            ;; 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))