# HG changeset patch # User Richard M. Stallman # Date 820573024 0 # Node ID 30b732ff2de2fabdb9ecb71b27e0c03f3b1429f6 # Parent 2f6eaea659da99d494920c11f6d67f80ff40c17b (sendmail-send-it): Make deletion of empty subject line work reliably. diff -r 2f6eaea659da -r 30b732ff2de2 lisp/mail/sendmail.el --- 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))