;;; nnmail.el --- mail support functions for the Gnus mail backends
-;; Copyright (C) 1995-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2014 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
(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."
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)
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 ()
(number :tag "count")))
(define-widget 'nnmail-lazy 'default
- "Base widget for recursive datastructures.
+ "Base widget for recursive data structures.
This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility."
:format "%{%t%}: %v"
"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"
+ :version "24.3"
:group 'nnmail
:type '(repeat symbol))
;; Check the cache for the regexp for this split.
((setq cached-pair (assq split nnmail-split-cache))
(let (split-result
+ match-data
(end-point (point-max))
(value (nth 1 split)))
(if (symbolp value)
(setq value (cdr (assq value nnmail-split-abbrev-alist))))
(while (and (goto-char end-point)
(re-search-backward (cdr cached-pair) nil t))
+ (setq match-data (match-data))
(when nnmail-split-tracing
(push split nnmail-split-trace))
(let ((split-rest (cddr split))
(setq split-rest (cddr split-rest))))
(when split-rest
(goto-char end)
- (let ((value (nth 1 split)))
- (if (symbolp value)
- (setq value (cdr (assq value nnmail-split-abbrev-alist))))
- ;; Someone might want to do a \N sub on this match, so get the
- ;; correct match positions.
- (re-search-backward value start-of-value))
+ ;; Someone might want to do a \N sub on this match, so
+ ;; restore the match data.
+ (set-match-data match-data)
(dolist (sp (nnmail-split-it (car split-rest)))
(unless (member sp split-result)
(push sp split-result))))))
((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)