*** empty log message ***
[bpt/emacs.git] / lisp / mail / sendmail.el
index c22d7d8..2a7f21d 100644 (file)
@@ -18,8 +18,6 @@
 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
 
-(provide 'sendmail)
-
 ;;;###autoload
 (defconst mail-self-blind nil "\
 Non-nil means insert BCC to self in messages to be sent.
@@ -449,7 +447,7 @@ the user from the mailer."
   (let (end
        (case-fold-search t))
     (goto-char (point-min))
-    (search-forward (concat "^" mail-header-separator "\n"))
+    (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n"))
     (setq end (match-beginning 0))
     (goto-char (point-min))
     (if (re-search-forward (concat "^" (regexp-quote field) ":") end t)
@@ -461,7 +459,8 @@ the user from the mailer."
       (or soft
          (progn (goto-char end)
                 (skip-chars-backward "\n")
-                (insert "\n" field ": ")))
+                (insert field ": \n")
+                (skip-chars-backward "\n")))
       nil)))
 
 (defun mail-text ()
@@ -660,3 +659,6 @@ The seventh argument ACTIONS is a list of actions to take
 
 
 ;;; Do not add anything but external entries on this page.
+
+(provide 'sendmail)
+