From 0af64910724eeb004c50cb7a436d6783b6628155 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 31 Jul 1994 20:08:53 +0000 Subject: [PATCH] (rmail-retry-failure): Handle a weird case with a couple of lines before the old message header. --- lisp/mail/rmail.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 93d8fc3ac5a..1d3246e5e1f 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2098,6 +2098,14 @@ the body of the original message." (or (re-search-forward mail-unsent-separator nil t) (error "Cannot parse this as a failure message"))) (save-restriction + ;; One message contained a few random lines before the old + ;; message header. The first line of the message started with + ;; two hyphens. A blank line follows these random lines. + (skip-chars-forward "\n") + (if (looking-at "^--") + (progn + (search-forward "\n\n") + (skip-chars-forward "\n"))) (narrow-to-region (point) (point-max)) ;; Now mail-fetch-field will get from headers of the original message, ;; not from the headers of the rejection. -- 2.39.5