From: martin rudalics Date: Fri, 13 Apr 2018 07:42:19 +0000 (+0000) Subject: * lisp/gnus/gnus-art.el (gnus-article-prepare): Fix previous commit, X-Git-Tag: emacs-27.0.90~5264 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a20d2e6625392cced400f5983f998bf2673c9d57;p=emacs.git * lisp/gnus/gnus-art.el (gnus-article-prepare): Fix previous commit, in which selecting the article window is not necessary (bug#25526). --- diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index f8a29ea2e51..ed6e77fb329 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -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))))))