* nndraft.el (nndraft-update-unread-articles): Don't move point around in the group...
authorLeo <sdl.web@gmail.com>
Wed, 4 Jan 2012 19:42:09 +0000 (20:42 +0100)
committerLars Magne Ingebrigtsen <larsi@stories.(none)>
Wed, 4 Jan 2012 19:42:09 +0000 (20:42 +0100)
lisp/ChangeLog
lisp/nndraft.el

index d147706..8c3c755 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-04  Leo  <sdl.web@gmail.com>
+
+       * nndraft.el (nndraft-update-unread-articles): Don't move point around
+       in the group buffer.
+
 2012-01-04  Julien Danjou  <julien@danjou.info>
 
        * nnimap.el (nnimap-update-info): Fix an error when all articles UIDs
index 0b47062..976e6e6 100644 (file)
@@ -181,13 +181,14 @@ are generated if and only if they are also in `message-draft-headers'.")
           (gnus-get-new-news-hook nil)
           (inhibit-read-only t))
       (gnus-group-get-new-news-this-group nil t)
-      (dolist (group groups)
-       (unless (and gnus-permanently-visible-groups
-                    (string-match gnus-permanently-visible-groups
-                                  group))
-         (gnus-group-goto-group group)
-         (when (zerop (gnus-group-group-unread))
-           (gnus-delete-line)))))))
+      (save-excursion
+       (dolist (group groups)
+         (unless (and gnus-permanently-visible-groups
+                      (string-match gnus-permanently-visible-groups
+                                    group))
+           (gnus-group-goto-group group)
+           (when (zerop (gnus-group-group-unread))
+             (gnus-delete-line))))))))
 
 (deffoo nndraft-request-associate-buffer (group)
   "Associate the current buffer with some article in the draft group."