* gnus-int.el (gnus-request-move-article): Agent expire article if
authorSimon Josefsson <jas@extundo.com>
Tue, 11 Jun 2002 20:25:37 +0000 (20:25 +0000)
committerSimon Josefsson <jas@extundo.com>
Tue, 11 Jun 2002 20:25:37 +0000 (20:25 +0000)
successfuly moved.

lisp/ChangeLog
lisp/gnus-int.el

index 930460f..2278ce3 100644 (file)
@@ -1,5 +1,8 @@
 2002-06-11  Simon Josefsson  <jas@extundo.com>
 
+       * gnus-int.el (gnus-request-move-article): Agent expire article if
+       successfuly moved.
+
        * nnweb.el (nnweb-google-create-mapping): Honors the value of
        nnweb-max-hits.  From Niklas Morberg <niklas.morberg@axis.com>.
 
index 1c59940..ab1c0a8 100644 (file)
@@ -496,13 +496,15 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
                         group 'force))
     not-deleted))
 
-(defun gnus-request-move-article
-  (article group server accept-function &optional last)
-  (let ((gnus-command-method (gnus-find-method-for-group group)))
-    (funcall (gnus-get-function gnus-command-method 'request-move-article)
-            article (gnus-group-real-name group)
-            (nth 1 gnus-command-method) accept-function last)))
-
+(defun gnus-request-move-article (article group server accept-function &optional last)
+  (let* ((gnus-command-method (gnus-find-method-for-group group))
+        (result (funcall (gnus-get-function gnus-command-method 'request-move-article)
+                         article (gnus-group-real-name group)
+                         (nth 1 gnus-command-method) accept-function last)))
+    (when (and result gnus-agent gnus-agent-cache)
+      (gnus-agent-expire article group 'force))
+    result))
+    
 (defun gnus-request-accept-article (group &optional gnus-command-method last
                                          no-encode)
   ;; Make sure there's a newline at the end of the article.