From: Richard M. Stallman Date: Mon, 25 Sep 1995 18:40:24 +0000 (+0000) Subject: (undigestify-rmail-message): Scan back as far as start X-Git-Tag: emacs-19.34~2780 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d2e6ef5ca1a84decc72ea6c513c40a7b9d9f798;p=emacs.git (undigestify-rmail-message): Scan back as far as start of message, to find end of digest. --- 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------*\\)*"))