From: Richard M. Stallman Date: Tue, 2 Jan 1996 08:57:04 +0000 (+0000) Subject: (sendmail-send-it): Make deletion of empty subject line work reliably. X-Git-Tag: emacs-19.34~1941 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5411544782cf59fe135eff3732952f16e06c5a06;p=emacs.git (sendmail-send-it): Make deletion of empty subject line work reliably. --- 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))