X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fnnmail.el;h=988e1cdc131505089ada9ef5b5c14cd28c7f3ce1;hb=afbf528d6fb2fdb90f56a50212e46178b869a28b;hp=06b464c0b2911a7fb8d8e060b5254c1d9c2da9fe;hpb=b4c2afa2ae86dd41f9edd2e14ae6c3c4696cde07;p=gnus diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 06b464c0b..988e1cdc1 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1,8 +1,6 @@ ;;; nnmail.el --- mail support functions for the Gnus mail backends -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1995-2012 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news, mail @@ -555,9 +553,11 @@ parameter. It should return nil, `warn' or `delete'." (const warn) (const delete))) -(defcustom nnmail-extra-headers '(To Newsgroups) - "*Extra headers to parse." - :version "21.1" +(defcustom nnmail-extra-headers '(To Newsgroups Cc) + "Extra headers to parse. +In addition to the standard headers, these extra headers will be +included in NOV headers (and the like) when backends parse headers." + :version "24.2" :group 'nnmail :type '(repeat symbol)) @@ -1150,6 +1150,7 @@ FUNC will be called with the group name to determine the article number." (setq nnmail-split-trace nil)) (if (or (and (symbolp nnmail-split-methods) (fboundp nnmail-split-methods)) + (not (consp (car-safe nnmail-split-methods))) (and (listp nnmail-split-methods) ;; Not a regular split method, so it has to be a ;; fancy one. @@ -1216,7 +1217,8 @@ FUNC will be called with the group name to determine the article number." ;; This is the final group, which is used as a ;; catch-all. (when (and (not group-art) - (not nnmail-inhibit-default-split-group)) + (or (equal "" (nth 1 method)) + (not nnmail-inhibit-default-split-group))) (setq group-art (list (cons (car method) (funcall func (car method)))))))) @@ -1797,7 +1799,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (i 0) (new 0) (total 0) - incoming incomings source) + source) (when (and (nnmail-get-value "%s-get-new-mail" method) sources) (while (setq source (pop sources)) @@ -1840,18 +1842,23 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." ;; and fetch the mail from each. (while (setq source (pop fetching-sources)) (when (setq new - (mail-source-fetch - source - (gnus-byte-compile - `(lambda (file orig-file) - (nnmail-split-incoming - file ',(intern (format "%s-save-mail" method)) - ',spool-func - (or in-group - (if (equal file orig-file) - nil - (nnmail-get-split-group orig-file ',source))) - ',(intern (format "%s-active-number" method))))))) + (condition-case cond + (mail-source-fetch + source + (gnus-byte-compile + `(lambda (file orig-file) + (nnmail-split-incoming + file ',(intern (format "%s-save-mail" method)) + ',spool-func + (or in-group + (if (equal file orig-file) + nil + (nnmail-get-split-group orig-file + ',source))) + ',(intern (format "%s-active-number" method)))))) + ((error quit) + (message "Mail source %s failed: %s" source cond) + 0))) (incf total new) (incf i))) ;; If we did indeed read any incoming spools, we save all info. @@ -1915,7 +1922,7 @@ If TIME is nil, then return the cutoff time for oldness instead." (unless (eq target 'delete) (when (or (gnus-request-group target) (gnus-request-create-group target)) - (let ((group-art (gnus-request-accept-article target nil t t))) + (let ((group-art (gnus-request-accept-article target nil nil t))) (when (and (consp group-art) (cdr group-art)) (gnus-group-mark-article-read target (cdr group-art))))))))