--- nnmail.el 1997/02/02 21:31:10 1.1 +++ nnmail.el 1997/02/02 21:33:46 @@ -1133,7 +1133,7 @@ ;; Check the cache for the regexp for this split. ;; FIX FIX FIX could avoid calling assq twice here ((assq split nnmail-split-cache) - (goto-char (point-max)) + (goto-char (point-min)) ;; FIX FIX FIX problem with re-search-backward is that if you have ;; a split: (from "foo-\\(bar\\|baz\\)@gnus.org "mail.foo.\\1") ;; and someone mails a message with 'To: foo-bar@gnus.org' and @@ -1148,15 +1148,15 @@ ;; removed duplicates, since there might be more of those. ;; I guess we could also remove duplicates in the & split case, since ;; that's the only thing that can introduce them. - (when (re-search-backward (cdr (assq split nnmail-split-cache)) nil t) + (when (re-search-forward (cdr (assq split nnmail-split-cache)) nil t) ;; Someone might want to do a \N sub on this match, so get the ;; correct match positions. - (goto-char (match-end 0)) + (goto-char (match-end 2)) (let ((value (nth 1 split))) - (re-search-backward (if (symbolp value) + (re-search-forward (if (symbolp value) (cdr (assq value nnmail-split-abbrev-alist)) value) - (match-end 1))) + (match-end 0))) (nnmail-split-it (nth 2 split)))) ;; Not in cache, compute a regexp for the field/value pair.