X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fnnmail.el;h=c4a347fad8b27c97d00e7814188de9436cc14117;hb=2ce8d66354a55ca69721c6833e2b50352aa4b49a;hp=c40fef4347f68eb618ce409f048406e7dd56e17b;hpb=7f6c1297a0180142e4e79183779736bffaa73fdd;p=gnus diff --git a/lisp/nnmail.el b/lisp/nnmail.el index c40fef434..c4a347fad 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -36,9 +36,8 @@ (require 'mm-util) (eval-and-compile - (autoload 'gnus-error "gnus-util") - (autoload 'gnus-buffer-live-p "gnus-util") - (autoload 'gnus-add-buffer "gnus")) + (autoload 'gnus-add-buffer "gnus") + (autoload 'gnus-kill-buffer "gnus")) (defgroup nnmail nil "Reading mail with Gnus." @@ -350,6 +349,11 @@ discarded after running the split process." :group 'nnmail-split :type 'hook) +(defcustom nnmail-spool-hook nil + "*A hook called when a new article is spooled." + :group 'nnmail + :type 'hook) + (defcustom nnmail-large-newsgroup 50 "*The number of the articles which indicates a large newsgroup or nil. If the number of the articles is greater than the value, verbose @@ -1328,7 +1332,7 @@ See the documentation for the variable `nnmail-split-fancy' for details." ;; correct match positions. (re-search-backward value start-of-value)) (dolist (sp (nnmail-split-it (car split-rest))) - (unless (memq sp split-result) + (unless (member sp split-result) (push sp split-result)))))) split-result)) @@ -1480,6 +1484,8 @@ See the documentation for the variable `nnmail-split-fancy' for details." (defvar group-art-list) (defvar group-art) (defun nnmail-cache-insert (id grp) + (run-hook-with-args 'nnmail-spool-hook + id grp) (when nnmail-treat-duplicates ;; Store some information about the group this message is written ;; to. This is passed in as the grp argument -- all locations this @@ -1882,7 +1888,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." "Remove all instances of GROUP from `nnmail-split-history'." (let ((history nnmail-split-history)) (while history - (setcar history (gnus-delete-if (lambda (e) (string= (car e) group)) + (setcar history (gnus-remove-if (lambda (e) (string= (car e) group)) (car history))) (pop history)) (setq nnmail-split-history (delq nil nnmail-split-history))))