From: Lars Ingebrigtsen Date: Tue, 24 Nov 2020 08:27:14 +0000 (+0100) Subject: Allow controlling whether SPC in Gnus goes to the next article X-Git-Tag: emacs-28.0.90~5047 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=329feffc68238e293854ca2183801056bdd8a6ff;p=emacs.git Allow controlling whether SPC in Gnus goes to the next article * doc/misc/gnus.texi (Summary Maneuvering): Document it. * lisp/gnus/gnus-sum.el (gnus-paging-select-next): New variable. (gnus-summary-prev-page, gnus-summary-next-page): Use it. --- diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 3f597455b75..81ce13945c1 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -5361,6 +5361,15 @@ articles with the same subject, go to the first unread article. This variable is not particularly useful if you use a threaded display. +@item gnus-paging-select-next +@vindex gnus-paging-select-next +Control whether to select the next/previous article when paging (with +commands like @kbd{SPC} or @kbd{DEL}). If non-@code{nil}, select the +next article when reaching the end of the article (or the previous +article when paging backwards). + +If @code{nil}, don't do anything at the end/start of the articles. + @item gnus-summary-check-current @vindex gnus-summary-check-current If non-@code{nil}, all the ``unread'' movement commands will not proceed diff --git a/etc/NEWS b/etc/NEWS index f3a75e4965c..135452bc303 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -481,6 +481,12 @@ tags to be considered as well. ** Gnus ++++ +*** New user option 'gnus-paging-select-next'. +This controls what happens when using commands like `SPC' and `DEL' to +page the current article. If non-nil (the default), go to the +next/prev article, but if nil, do nothing at the end/start of the article. + +++ *** New gnus-search library. A new unified search syntax which can be used across multiple diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 561f199531e..7444cab58cb 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -442,6 +442,15 @@ will go to the next group without confirmation." (const slightly-quietly) (sexp :menu-tag "on" t))) +(defcustom gnus-paging-select-next t + "Control whether to select the next/prev article when paging. +If non-nil, select the next article when reaching the end of the +article (or the previous article when paging backwards). + +If nil, don't do anything at the end/start of the articles." + :group 'gnus-summary-maneuvering + :type 'boolean) + (defcustom gnus-auto-select-same nil "If non-nil, select the next article with the same subject. If there are no more articles with the same subject, go to @@ -7898,7 +7907,8 @@ Also see the variable `gnus-article-skip-boring'." (gnus-message 3 "End of message")) (circular (gnus-summary-beginning-of-article)) - (lines + ((or lines + (not gnus-paging-select-next)) (gnus-message 3 "End of message")) ((null lines) (if (and (eq gnus-summary-goto-unread 'never) @@ -7929,7 +7939,8 @@ the beginning of the buffer." (gnus-eval-in-buffer-window gnus-article-buffer (setq endp (gnus-article-prev-page lines))) (when (and move endp) - (cond (lines + (cond ((or lines + (not gnus-paging-select-next)) (gnus-message 3 "Beginning of message")) ((null lines) (if (and (eq gnus-summary-goto-unread 'never)