]> git.eshelyaron.com Git - emacs.git/commitdiff
* mail/sendmail.el (mail-send): Search explicitly for
authorChong Yidong <cyd@stupidchicken.com>
Thu, 15 Jun 2006 18:34:26 +0000 (18:34 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 15 Jun 2006 18:34:26 +0000 (18:34 +0000)
mail-header-separator when checking for corrupted header lines.

lisp/ChangeLog
lisp/mail/sendmail.el

index f58d5a00f1e648132ef64bbcda5dd1dbc6030fe2..0f297921fb75752354492e60d69c1032aa2ad9fe 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-15  Chong Yidong  <cyd@stupidchicken.com>
+
+       * mail/sendmail.el (mail-send): Search explicitly for
+       mail-header-separator when checking for corrupted header lines.
+
 2006-06-15  Nick Roberts  <nickrob@snap.net.nz>
 
        * progmodes/gdb-ui.el (gdb-same-frame): New option.
index ee512b3af31ce84316e1ee4df7fdd9c03fec8bae..28463208c45ba429d770ac11c1340c25eddd0abf 100644 (file)
@@ -863,11 +863,14 @@ the user from the mailer."
                (error "Message contains non-ASCII characters"))))
        ;; Complain about any invalid line.
        (goto-char (point-min))
-       (while (< (point) (mail-header-end))
-         (unless (looking-at "[ \t]\\|.*:\\|$")
-           (push-mark opoint)
-           (error "Invalid header line (maybe a continuation line lacks initial whitespace)"))
-         (forward-line 1))
+       (re-search-forward (regexp-quote mail-header-separator) (point-max) t)
+       (let ((header-end (or (match-beginning 0) (point-max))))
+         (goto-char (point-min))
+         (while (< (point) header-end)
+           (unless (looking-at "[ \t]\\|.*:\\|$")
+             (push-mark opoint)
+             (error "Invalid header line (maybe a continuation line lacks initial whitespace)"))
+           (forward-line 1)))
        (goto-char opoint)
        (run-hooks 'mail-send-hook)
        (message "Sending...")