(rmail-message-regexp-p):

Handle unreformatted messages for real.
(rmail-message-recipients-p): Undo previous change.
This commit is contained in:
Richard M. Stallman 1998-04-18 01:54:05 +00:00
parent 42de5a7879
commit b4b87b68dd

View file

@ -2181,7 +2181,7 @@ or forward if N is negative."
(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 @@ or forward if N is negative."
(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)