]> git.eshelyaron.com Git - emacs.git/commitdiff
(rfc822-goto-eoh): Stop at a blank line, too.
authorRichard M. Stallman <rms@gnu.org>
Sat, 2 May 1998 06:50:44 +0000 (06:50 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 2 May 1998 06:50:44 +0000 (06:50 +0000)
(rfc822-goto-eoh): New function.
(sendmail-user-agent-compose): Use rfc822-goto-eoh.

lisp/simple.el

index 2b9e0266020f8ddc75c755beaf0081b207e61ae8..9e79a1148912da348aec11393ef815e4869ddea0 100644 (file)
@@ -3450,6 +3450,13 @@ Unibyte strings are converted to multibyte for comparison."
   'sendmail-user-agent-compose
   'mail-send-and-exit)
 
+(defun rfc822-goto-eoh ()
+  ;; Go to header delimiter line in a mail message, following RFC822 rules
+  (goto-char (point-min))
+  (while (looking-at "^[^: \n]+:\\|^[ \t]")
+    (forward-line 1))
+  (point))
+
 (defun sendmail-user-agent-compose (&optional to subject other-headers continue
                                              switch-function yank-action
                                              send-actions)
@@ -3465,9 +3472,7 @@ Unibyte strings are converted to multibyte for comparison."
        continue
        (error "Message aborted"))
     (save-excursion
-      (goto-char (point-min))
-      (search-forward mail-header-separator)
-      (beginning-of-line)
+      (rfc822-goto-eoh)
       (while other-headers
        (if (not (member (car (car other-headers)) '("in-reply-to" "cc")))
            (insert (car (car other-headers)) ": "