Don't alter gnus-newsgroup-active.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 27 Sep 2010 18:58:05 +0000 (20:58 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 27 Sep 2010 18:58:05 +0000 (20:58 +0200)
This makes ./ N' work after copying to the same group.

lisp/ChangeLog
lisp/gnus-sum.el
lisp/nnimap.el

index aa3faf1..f52a13d 100644 (file)
@@ -1,5 +1,11 @@
 2010-09-27  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-sum.el (gnus-summary-move-article): Don't alter
+       gnus-newsgroup-active.  This makes `/ N' work after copying to the same
+       group.
+
+       * nnimap.el (nnimap-update-info): Don't destructively alter active.
+
        * message.el (message-cite-prefix-regexp): Revert my last edit.
 
        * gnus-sum.el (gnus-summary-show-complete-article): Bind the server
index 02a098e..19c2253 100644 (file)
@@ -9806,8 +9806,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
                  ;; Mark this article as read in this group.
                  (push (cons to-article gnus-read-mark) gnus-newsgroup-reads)
                  ;; Increase the active status of this group.
-                 (setcdr (gnus-active to-group) to-article)
-                 (setcdr gnus-newsgroup-active to-article))
+                 (setcdr (gnus-active to-group) to-article))
 
                (while marks
                  (when (eq (gnus-article-mark-to-type (cdar marks)) 'list)
@@ -12637,7 +12636,8 @@ If ALL is a number, fetch this number of articles."
            (nnmail-fetched-sources (list t))
            i new)
        (setq gnus-newsgroup-active
-             (gnus-activate-group gnus-newsgroup-name 'scan))
+             (gnus-copy-sequence
+              (gnus-activate-group gnus-newsgroup-name 'scan)))
        (setq i (cdr gnus-newsgroup-active))
        (while (> i old-high)
          (push i new)
index a78300a..26cf297 100644 (file)
@@ -967,7 +967,8 @@ textual parts.")
                              (t
                               ;; No articles and no uidnext.
                               nil)))
-         (setcdr (gnus-active group) (or high (1- uidnext))))
+         (gnus-set-active (cons (car (gnus-active group))
+                                (or high (1- uidnext)))))
        (when (and (not high)
                   uidnext)
          (setq high (1- uidnext)))