diff lisp/gnus/nnml.el @ 22:8fc7fe29b841 r19-15b94

Import from CVS: tag r19-15b94
author cvs
date Mon, 13 Aug 2007 08:50:29 +0200
parents d95e72db5c07
children 4103f0995bd7
line wrap: on
line diff
--- a/lisp/gnus/nnml.el	Mon Aug 13 08:50:06 2007 +0200
+++ b/lisp/gnus/nnml.el	Mon Aug 13 08:50:29 2007 +0200
@@ -318,7 +318,9 @@
 			    (int-to-string article)))
 	 (file-error nil))
        (nnml-nov-delete-article group article)
-       (and last (nnml-save-nov))))
+       (when last
+	 (nnml-save-nov)
+	 (nnmail-save-active nnml-group-alist nnml-active-file))))
     result))
 
 (deffoo nnml-request-accept-article (group &optional server last)
@@ -774,9 +776,17 @@
 (defun nnml-nov-delete-article (group article)
   (save-excursion
     (set-buffer (nnml-open-nov group))
-    (goto-char (point-min))
-    (when (re-search-forward (concat "^" (int-to-string article) "\t") nil t)
-      (delete-region (match-beginning 0) (progn (forward-line 1) (point))))
+    (when (nnheader-find-nov-line article)
+      (delete-region (point) (progn (forward-line 1) (point)))
+      (when (bobp)
+	(let ((active (cadr (assoc group nnml-group-alist)))
+	      num)
+	  (when active
+	    (if (eobp)
+		(setf (car active) (1+ (cdr active)))
+	      (when (and (setq num (ignore-errors (read (current-buffer))))
+			 (numberp num))
+		(setf (car active) num)))))))
     t))
 
 (provide 'nnml)