- (let ((gnus-command-method (gnus-find-method-for-group group)))
- (funcall (gnus-get-function gnus-command-method 'request-expire-articles)
- articles (gnus-group-real-name group) (nth 1 gnus-command-method)
- force)))
-
-(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-accept-article (group &optional gnus-command-method last)
+ (let* ((gnus-command-method (gnus-find-method-for-group group))
+ (not-deleted
+ (funcall
+ (gnus-get-function gnus-command-method 'request-expire-articles)
+ articles (gnus-group-real-name group) (nth 1 gnus-command-method)
+ force)))
+ (when (and gnus-agent
+ (gnus-agent-method-p gnus-command-method))
+ (let ((expired-articles (gnus-sorted-difference articles not-deleted)))
+ (when expired-articles
+ (gnus-agent-expire expired-articles 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))
+ (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-method-p gnus-command-method))
+ (gnus-agent-expire (list article) group 'force))
+ result))
+
+(defun gnus-request-accept-article (group &optional gnus-command-method last
+ no-encode)