# HG changeset patch # User Richard M. Stallman # Date 892864445 0 # Node ID 50e05b0adf4a657442700807eb3b195d8c93726c # Parent fe56e79adf87260dde79eb49b7c45f5bf1dffdcb (rmail-message-regexp-p): Handle unreformatted messages for real. (rmail-message-recipients-p): Undo previous change. diff -r fe56e79adf87 -r 50e05b0adf4a lisp/mail/rmail.el --- a/lisp/mail/rmail.el Sat Apr 18 01:48:22 1998 +0000 +++ b/lisp/mail/rmail.el Sat Apr 18 01:54:05 1998 +0000 @@ -2181,7 +2181,7 @@ (defun rmail-message-recipients-p (msg recipients &optional primary-only) (save-restriction (goto-char (rmail-msgbeg msg)) - (search-forward "\n*** EOOH ***\n" (point-max) t) + (search-forward "\n*** EOOH ***\n") (narrow-to-region (point) (progn (search-forward "\n\n") (point))) (or (string-match recipients (or (mail-fetch-field "To") "")) (string-match recipients (or (mail-fetch-field "From") "")) @@ -2190,13 +2190,20 @@ (defun rmail-message-regexp-p (msg regexp) "Return t, if for message number MSG, regexp REGEXP matches in the header." - (goto-char (rmail-msgbeg msg)) - (let ((end - (save-excursion - (or (search-forward "\n*** EOOH ***\n" (point-max) t) - (search-forward "\n\n" (point-max))) - (point)))) - (re-search-forward regexp end t))) + (save-excursion + (goto-char (rmail-msgbeg msg)) + (let (beg end) + (save-excursion + (forward-line 2) + (setq beg (point))) + (save-excursion + (search-forward "\n*** EOOH ***\n" (point-max)) + (when (= beg (match-beginning 0)) + (setq beg (point)) + (search-forward "\n\n" (point-max))) + (setq end (point))) + (goto-char beg) + (re-search-forward regexp end t)))) (defvar rmail-search-last-regexp nil) (defun rmail-search (regexp &optional n)