diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-01-02 08:57:04 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-01-02 08:57:04 +0000 |
commit | 0575310893590fdb85465aa46bb28668cf6dceea (patch) | |
tree | 0b6fc7e91c9d6ce04369e4782e2868181a9f075a /lisp/mail | |
parent | 825c2446c71d0583d8d626878af3d3bca5624f78 (diff) | |
download | emacs-0575310893590fdb85465aa46bb28668cf6dceea.tar.gz |
(sendmail-send-it): Make deletion of empty subject line work reliably.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/sendmail.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index dc7b848ca73..a5fdc8d5d47 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -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)) |