summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/gnus-sum.el20
2 files changed, 19 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 6541c699c48..441a8c90f70 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
+2014-08-14 Alan Schmitt <alan.schmitt@polytechnique.org>
+
+ * gnus-sum.el (gnus-summary-expire-articles): Functions registered to
+ the gnus-summary-article-expire-hook should be told where the function
+ is going. In particular, the Gnus registry might want to know.
+
2014-08-12 Stefan Monnier <monnier@iro.umontreal.ca>
* gnus-art.el (gnus-hidden-properties): Drop the evil `intangible'.
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index c0e099ba3ca..db0242ef42b 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -10444,13 +10444,19 @@ This will be the case if the article has both been mailed and posted."
(when (and (not (memq article es))
(gnus-data-find article))
(gnus-summary-mark-article article gnus-canceled-mark)
- (run-hook-with-args 'gnus-summary-article-expire-hook
- 'delete
- (gnus-data-header
- (assoc article (gnus-data-list nil)))
- gnus-newsgroup-name
- nil
- nil)))))))
+ (run-hook-with-args
+ 'gnus-summary-article-expire-hook
+ 'delete
+ (gnus-data-header (assoc article (gnus-data-list nil)))
+ gnus-newsgroup-name
+ (cond
+ ((stringp nnmail-expiry-target) nnmail-expiry-target)
+ ((eq nnmail-expiry-target 'delete) nil)
+ (t
+ (let ((rescall (funcall nnmail-expiry-target
+ gnus-newsgroup-name)))
+ (if (stringp rescall) rescall nil))))
+ nil)))))))
(gnus-message 6 "Expiring articles...done")))))
(defun gnus-summary-expire-articles-now ()