diff lisp/gnus/gnus-group.el @ 26:441bb1e64a06 r19-15b96

Import from CVS: tag r19-15b96
author cvs
date Mon, 13 Aug 2007 08:51:32 +0200
parents 4103f0995bd7
children 1917ad0d78d7
line wrap: on
line diff
--- a/lisp/gnus/gnus-group.el	Mon Aug 13 08:51:05 2007 +0200
+++ b/lisp/gnus/gnus-group.el	Mon Aug 13 08:51:32 2007 +0200
@@ -1128,8 +1128,11 @@
   "Update all lines where GROUP appear.
 If VISIBLE-ONLY is non-nil, the group won't be displayed if it isn't
 already."
-  (save-excursion
+  ;; Can't use `save-excursion' here, so we do it manually.
+  (let ((buf (current-buffer))
+	mark)
     (set-buffer gnus-group-buffer)
+    (setq mark (point-marker))
     ;; The buffer may be narrowed.
     (save-restriction
       (widen)
@@ -1179,7 +1182,10 @@
 	      (run-hooks 'gnus-group-update-group-hook))))
 	(when gnus-group-update-group-function
 	  (funcall gnus-group-update-group-function group))
-	(gnus-group-set-mode-line)))))
+	(gnus-group-set-mode-line)))
+    (goto-char mark)
+    (set-marker mark nil)
+    (set-buffer buf)))
 
 (defun gnus-group-set-mode-line ()
   "Update the mode line in the group buffer."
@@ -1836,7 +1842,7 @@
 
   ;; We find the proper prefixed name.
   (setq new-name
-	(if (equal (gnus-group-real-name new-name) new-name)
+	(if (gnus-group-native-p group)
 	    ;; Native group.
 	    new-name
 	  ;; Foreign group.
@@ -2848,7 +2854,8 @@
     (let ((gnus-read-active-file (if arg nil gnus-read-active-file)))
       (gnus-get-unread-articles arg)))
   (run-hooks 'gnus-after-getting-new-news-hook)
-  (gnus-group-list-groups))
+  (gnus-group-list-groups (and (numberp arg)
+			       (max (car gnus-group-list-mode) arg))))
 
 (defun gnus-group-get-new-news-this-group (&optional n)
   "Check for newly arrived news in the current group (and the N-1 next groups).