Add a kludge to reselect the summary buffer before reading going to the next buffer.
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 21 Feb 2011 02:00:04 +0000 (18:00 -0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 21 Feb 2011 02:00:04 +0000 (18:00 -0800)
This avoids putting the point in the group buffer if you `C-g' the
command.

lisp/ChangeLog
lisp/gnus-sum.el

index 16e1fa3..dc5b50a 100644 (file)
@@ -1,5 +1,9 @@
 2011-02-21  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-sum.el (gnus-summary-next-article): Add a kludge to reselect the
+       summary buffer before reading going to the next buffer.  This avoids
+       putting the point in the group buffer if you `C-g' the command.
+
        * auth-source.el (auth-source-netrc-parse): Add an in-memory netrc
        cache (for now) to make ~/.authinfo.gpg files usable.
 
index 619c8bd..789308c 100644 (file)
@@ -7734,6 +7734,7 @@ If BACKWARD, the previous article is selected instead of the next."
          (point
           (with-current-buffer gnus-group-buffer
             (point)))
+         (current-summary (current-buffer))
          (group
           (if (eq gnus-keep-same-level 'best)
               (gnus-summary-best-group gnus-newsgroup-name)
@@ -7758,6 +7759,10 @@ If BACKWARD, the previous article is selected instead of the next."
          (gnus-summary-next-group nil group backward)))
        (t
        (when (gnus-key-press-event-p last-input-event)
+         ;; Somehow or other, we may now have selected a different
+         ;; window.  Make point go back to the summary buffer.
+         (when (eq current-summary (current-buffer))
+           (select-window (get-buffer-window current-summary)))
          (gnus-summary-walk-group-buffer
           gnus-newsgroup-name cmd unread backward point))))))))