From 5d2e6ef5ca1a84decc72ea6c513c40a7b9d9f798 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 25 Sep 1995 18:40:24 +0000 Subject: [PATCH] (undigestify-rmail-message): Scan back as far as start of message, to find end of digest. --- lisp/mail/undigest.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el index b80a5f4a48b..83ea58b3b63 100644 --- a/lisp/mail/undigest.el +++ b/lisp/mail/undigest.el @@ -55,10 +55,12 @@ Leaves original message, deleted, before the undigestified messages." (point-max)) (let* ((fill-prefix "") (case-fold-search t) + start (digest-name (mail-strip-quoted-names (or (save-restriction (search-forward "\n\n") + (setq start (point)) (narrow-to-region (point-min) (point)) (goto-char (point-max)) (or (mail-fetch-field "Reply-To") @@ -69,11 +71,10 @@ Leaves original message, deleted, before the undigestified messages." (save-excursion (goto-char (point-max)) (skip-chars-backward " \t\n") - (let ((count 10) found) + (let (found) ;; compensate for broken un*x digestifiers. Sigh Sigh. - (while (and (> count 0) (not found)) + (while (and (> (point) start) (not found)) (forward-line -1) - (setq count (1- count)) (if (looking-at (concat "End of.*Digest.*\n" (regexp-quote "*********") "*" "\\(\n------*\\)*")) -- 2.39.2