Delete temporary files when Gnus exits instead of using timers
[gnus] / lisp / nnmail.el
index d83467a..5be449e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; nnmail.el --- mail support functions for the Gnus mail backends
 
 ;;; nnmail.el --- mail support functions for the Gnus mail backends
 
-;; Copyright (C) 1995-201 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2013 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news, mail
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news, mail
@@ -40,6 +40,8 @@
 
 (autoload 'gnus-add-buffer "gnus")
 (autoload 'gnus-kill-buffer "gnus")
 
 (autoload 'gnus-add-buffer "gnus")
 (autoload 'gnus-kill-buffer "gnus")
+(eval-when-compile
+  (autoload 'mail-send-and-exit "sendmail" nil t))
 
 (defgroup nnmail nil
   "Reading mail with Gnus."
 
 (defgroup nnmail nil
   "Reading mail with Gnus."
@@ -177,7 +179,7 @@ is to be performed in, and it should return an integer that says how
 many days an article can be stored before it is considered \"old\".
 It can also return the values `never' and `immediate'.
 
 many days an article can be stored before it is considered \"old\".
 It can also return the values `never' and `immediate'.
 
-Eg.:
+E.g.:
 
 \(setq nnmail-expiry-wait-function
       (lambda (newsgroup)
 
 \(setq nnmail-expiry-wait-function
       (lambda (newsgroup)
@@ -289,7 +291,7 @@ directory.  This hook is called after the incoming mail box has been
 emptied, and can be used to call any mail box programs you have
 running (\"xwatch\", etc.)
 
 emptied, and can be used to call any mail box programs you have
 running (\"xwatch\", etc.)
 
-Eg.
+E.g.:
 
 \(add-hook 'nnmail-read-incoming-hook
          (lambda ()
 
 \(add-hook 'nnmail-read-incoming-hook
          (lambda ()
@@ -553,11 +555,11 @@ parameter.  It should return nil, `warn' or `delete'."
                 (const warn)
                 (const delete)))
 
                 (const warn)
                 (const delete)))
 
-(defcustom nnmail-extra-headers '(To Newsgroups)
+(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."
   "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 "21.1"
+  :version "24.3"
   :group 'nnmail
   :type '(repeat symbol))
 
   :group 'nnmail
   :type '(repeat symbol))
 
@@ -1799,7 +1801,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
         (i 0)
         (new 0)
         (total 0)
         (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))
     (when (and (nnmail-get-value "%s-get-new-mail" method)
               sources)
       (while (setq source (pop sources))
@@ -1950,9 +1952,13 @@ If TIME is nil, then return the cutoff time for oldness instead."
        ((and (equal header 'to-from)
             (or (string-match (cadr regexp-target-pair) from)
                 (and (string-match (cadr regexp-target-pair) to)
        ((and (equal header 'to-from)
             (or (string-match (cadr regexp-target-pair) from)
                 (and (string-match (cadr regexp-target-pair) to)
-                     (let ((rmail-dont-reply-to-names
-                            (message-dont-reply-to-names)))
-                       (equal (rmail-dont-reply-to from) "")))))
+                     (let* ((mail-dont-reply-to-names
+                             (message-dont-reply-to-names))
+                            (rmail-dont-reply-to-names ; obsolete since 24.1
+                             mail-dont-reply-to-names))
+                       (equal (if (fboundp 'rmail-dont-reply-to)
+                                  (rmail-dont-reply-to from)
+                                (mail-dont-reply-to from)) "")))))
        (setq target (format-time-string (caddr regexp-target-pair) date)))
        ((and (not (equal header 'to-from))
             (string-match (cadr regexp-target-pair)
        (setq target (format-time-string (caddr regexp-target-pair) date)))
        ((and (not (equal header 'to-from))
             (string-match (cadr regexp-target-pair)