X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnus-sum.el;h=bfc78a3998bf5ba39905945ce4e6a52030d644f5;hb=e42093da43ac9af894c2c28f5b62c7256252769e;hp=6fbc64d1750d25d017d7572641ba9872408b5d2b;hpb=e523b3be1aa2d33ce6b5af6906930a4d349c6f0d;p=elisp%2Fgnus.git- diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 6fbc64d..bfc78a3 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -5126,22 +5126,24 @@ With arg, turn line truncation on iff arg is positive." (redraw-display)) (defun gnus-summary-reselect-current-group (&optional all rescan) - "Exit and then reselect the current newsgroup. + "Rescan the current newsgroup, exit and then reselect it. The prefix argument ALL means to select all articles." (interactive "P") (when (gnus-ephemeral-group-p gnus-newsgroup-name) (error "Ephemeral groups can't be reselected")) (let ((current-subject (gnus-summary-article-number)) (group gnus-newsgroup-name)) + (save-excursion + (set-buffer gnus-group-buffer) + ;; We have to adjust the point of group mode buffer because + ;; point was moved to the next unread newsgroup by exiting. + (gnus-summary-jump-to-group group) + (when rescan + (save-excursion + (gnus-group-get-new-news-this-group 1)))) (setq gnus-newsgroup-begin nil) (gnus-summary-exit) - ;; We have to adjust the point of group mode buffer because - ;; point was moved to the next unread newsgroup by exiting. - (gnus-summary-jump-to-group group) - (when rescan - (save-excursion - (gnus-group-get-new-news-this-group 1))) - (gnus-group-read-group all t) + (gnus-group-read-group all t group) (gnus-summary-goto-subject current-subject nil t))) (defun gnus-summary-rescan-group (&optional all)