Synch with Oort Gnus.
authoryamaoka <yamaoka>
Wed, 11 Apr 2001 22:05:59 +0000 (22:05 +0000)
committeryamaoka <yamaoka>
Wed, 11 Apr 2001 22:05:59 +0000 (22:05 +0000)
lisp/ChangeLog
lisp/nnmail.el

index f947b68..6edbbc6 100644 (file)
@@ -1,3 +1,9 @@
+2001-04-02  Nevin Kapur  <nevin@jhu.edu>
+       Committed by Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>.
+
+       * nnmail.el (nnmail-split-it): Added check for .* at the end of
+       regexp in nnmail-split-fancy.
+
 2001-04-10  Simon Josefsson  <simon@josefsson.org>
 
        * message.el (message-options-set-recipient): Look at Cc and Bcc too.
index eeab242..05e9022 100644 (file)
@@ -1243,22 +1243,29 @@ See the documentation for the variable `nnmail-split-fancy' for documentation."
      (t
       (let* ((field (nth 0 split))
             (value (nth 1 split))
-            partial regexp)
+            partial-front regexp
+            partial-rear  regexp)
        (if (symbolp value)
            (setq value (cdr (assq value nnmail-split-abbrev-alist))))
        (if (and (>= (length value) 2)
                 (string= ".*" (substring value 0 2)))
            (setq value (substring value 2)
-                 partial ""))
+                 partial-front ""))
+       ;; Same trick for the rear of the regexp
+       (if (and (>= (length value) 2)
+                (string= ".*" (substring value -2)))
+           (setq value (substring value 0 -2)
+                 partial-rear ""))
        (setq regexp (concat "^\\(\\("
                             (if (symbolp field)
                                 (cdr (assq field nnmail-split-abbrev-alist))
                               field)
                             "\\):.*\\)"
-                            (or partial "\\<")
+                            (or partial-front "\\<")
                             "\\("
                             value
-                            "\\)\\>"))
+                            "\\)"
+                            (or partial-rear "\\>")))
        (push (cons split regexp) nnmail-split-cache)
        ;; Now that it's in the cache, just call nnmail-split-it again
        ;; on the same split, which will find it immediately in the cache.