;;; nnmail.el --- mail support functions for the Gnus mail backends
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
This variable is obsolete; `mail-sources' should be used instead."
:group 'nnmail-files
:type 'sexp)
+(make-obsolete-variable 'nnmail-spool-file
+ "This option is obsolete in Gnus 5.9. \
+Use `mail-sources' instead.")
+;; revision 5.29 / p0-85 / Gnus 5.9
(defcustom nnmail-resplit-incoming nil
"*If non-nil, re-split incoming procmail sorted mail."
(if (and (symbolp nnmail-split-methods)
(fboundp nnmail-split-methods))
(let ((split
- (condition-case nil
+ (condition-case error-info
;; `nnmail-split-methods' is a function, so we
;; just call this function here and use the
;; result.
'("bogus"))
(error
(nnheader-message
- 5 "Error in `nnmail-split-methods'; using `bogus' mail group")
+ 5 "Error in `nnmail-split-methods'; using `bogus' mail group: %S" error-info)
(sit-for 1)
'("bogus")))))
(setq split (mm-delete-duplicates split))
;; Not in cache, compute a regexp for the field/value pair.
(t
- (let* ((field (nth 0 split))
- (value (nth 1 split))
- partial-front
- partial-rear
- regexp)
+ (let ((field (nth 0 split))
+ (value (nth 1 split))
+ (split-rest (cddr split))
+ partial-front
+ partial-rear
+ regexp)
(if (symbolp value)
(setq value (cdr (assq value nnmail-split-abbrev-alist))))
(if (and (>= (length value) 2)
(string= ".*" (substring value -2)))
(setq value (substring value 0 -2)
partial-rear ""))
- (when nnmail-split-fancy-match-partial-words
+ ;; Invert the match-partial-words behavior if the optional
+ ;; last element is specified.
+ (while (eq (car split-rest) '-)
+ (setq split-rest (cddr split-rest)))
+ (when (if (cadr split-rest)
+ (not nnmail-split-fancy-match-partial-words)
+ nnmail-split-fancy-match-partial-words)
(setq partial-front ""
partial-rear ""))
(setq regexp (concat "^\\(\\("
(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.
+ ;; on the same split, which will find it immediately in the cache.
(nnmail-split-it split))))))
(defun nnmail-expand-newtext (newtext)
&optional group spool-func)
"Read new incoming mail."
(let* ((sources (or mail-sources
- (if (listp nnmail-spool-file) nnmail-spool-file
+ (if (listp nnmail-spool-file)
+ nnmail-spool-file
(list nnmail-spool-file))))
fetching-sources
(group-in group)