]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/gnus/gnus-art.el (gnus-article-prepare): Fix previous commit,
authormartin rudalics <rudalics@gmx.at>
Fri, 13 Apr 2018 07:42:19 +0000 (07:42 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 13 Apr 2018 07:42:19 +0000 (07:42 +0000)
in which selecting the article window is not necessary (bug#25526).

lisp/gnus/gnus-art.el

index f8a29ea2e51ee4ce0c1ce192a02c327bb44c4a44..ed6e77fb32902427b4f7be5cf09cddaf65ef44cf 100644 (file)
@@ -4697,9 +4697,10 @@ If ALL-HEADERS is non-nil, no headers are hidden."
            (set-window-point (get-buffer-window (current-buffer)) (point))
            (gnus-configure-windows 'article)
            ;; Make sure the article begins with the top of the header.
-           (save-selected-window
-             (select-window (get-buffer-window gnus-article-buffer))
-             (goto-char (point-min)))
+           (let ((window (get-buffer-window gnus-article-buffer)))
+             (when window
+               (with-current-buffer (window-buffer window)
+                 (set-window-point window (point-min)))))
            (gnus-run-hooks 'gnus-article-prepare-hook)
            t))))))