--- nnmh.el.orig	Wed Nov 22 11:31:40 2000
+++ nnmh.el	Wed Nov 22 13:50:37 2000
@@ -53,6 +53,14 @@
 articles in this folder.  The articles that are \"new\" will be marked
 as unread by Gnus.")
 
+;; ugh -- why does user need to know what mail backend she has?
+(defcustom nnmh-expiry-target 'delete
+  "*Variable that says where expired messages should end up."
+    :group 'nnmh-expire
+    :type '(choice (const delete)
+		   (function :format "%v" nnmh-)
+		   string))
+
 
 
 (defconst nnmh-version "nnmh 1.0"
@@ -248,10 +256,28 @@
 (deffoo nnmh-request-newgroups (date &optional server)
   (nnmh-request-list server))
 
+;; Do we need this?  We can't seem to use nnmail-expiry-target-group.
+;; What exacty is generic, and what's backend (nnmail, nnml, nnheader)?
+;; -- jcn
+(defun nnmh-expiry-target-group (target group)
+  (when (nnheader-functionp target)
+    (setq target (funcall target group)))
+  (unless (eq target 'delete)
+    (gnus-request-accept-article target)))
+
+;; Urg, there's lots of code duplication and not much doco in backends
+;; group = nnmh:inbox.foo
+;; newsgroup = inbox.foo   == (gnus-group-real-name group)
+;; -- jcn
 (deffoo nnmh-request-expire-articles (articles newsgroup
 					       &optional server force)
   (nnmh-possibly-change-directory newsgroup server)
   (let* ((is-old t)
+	 ;; gnus-group::gnus-group-expire-articles-1 only checks for
+	 ;; nnmail backend
+	 (nnmh-expiry-target
+	   (or (gnus-group-find-parameter group 'expiry-target)
+	       nnmh-expiry-target))
 	 article rest mod-time)
     (nnheader-init-server-buffer)
 
@@ -263,6 +289,13 @@
 		 (setq is-old
 		       (nnmail-expired-article-p newsgroup mod-time force)))
 	    (progn
+	      ;; Allow a special target group. -- jcn
+	      (unless (eq nnmh-expiry-target 'delete)
+		(with-temp-buffer
+		  (nnmh-request-article (car articles)
+					newsgroup server (current-buffer))
+		  (nnmh-expiry-target-group
+		   nnmh-expiry-target group)))
 	      (nnheader-message 5 "Deleting article %s in %s..."
 				article newsgroup)
 	      (condition-case ()

