diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2018-04-17 20:02:26 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2018-04-17 20:02:26 +0200 |
commit | c90984250b31fa0d33064e85c3a243e6018f9592 (patch) | |
tree | 8c8d35870704958a49bc7d043160c237fe504573 /lisp/gnus | |
parent | 62a075b01678c6a6f5d2a69c9ea6904a3927f1b4 (diff) | |
download | emacs-c90984250b31fa0d33064e85c3a243e6018f9592.tar.gz emacs-c90984250b31fa0d33064e85c3a243e6018f9592.tar.bz2 emacs-c90984250b31fa0d33064e85c3a243e6018f9592.zip |
Tweak point placement in gnus-summary-select-article-buffer
* lisp/gnus/gnus-sum.el (gnus-summary-select-article-buffer):
Ensure that point is where it's supposed to be after switching to
the article buffer.
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/gnus-sum.el | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 234d527cd10..596afd15525 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -7063,17 +7063,20 @@ buffer." (or (get-buffer-window gnus-article-buffer) (eq gnus-current-article (gnus-summary-article-number)) (gnus-summary-show-article)) - (gnus-configure-windows - (if gnus-widen-article-window - 'only-article - 'article) - t) - (select-window (get-buffer-window gnus-article-buffer)) - ;; If we've just selected the message, place point at the start of - ;; the body because that's probably where we want to be. - (when (bobp) - (article-goto-body) - (forward-char -1)))) + (let ((point (with-current-buffer gnus-article-buffer + (point)))) + (gnus-configure-windows + (if gnus-widen-article-window + 'only-article + 'article) + t) + (select-window (get-buffer-window gnus-article-buffer)) + ;; If we've just selected the message, place point at the start of + ;; the body because that's probably where we want to be. + (if (not (bobp)) + (goto-char point) + (article-goto-body) + (forward-char -1))))) (defun gnus-summary-universal-argument (arg) "Perform any operation on all articles that are process/prefixed." |