From 3ed4cc1af954442478088dc590d4a311e3187be5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 8 Jul 2005 13:48:33 +0000 Subject: [PATCH] (gnus-article-next-page, gnus-article-next-page-1) (gnus-article-prev-page): Take scroll-margin into consideration. --- lisp/gnus/gnus-art.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index fd032e9964d..82f06d2f5a2 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -5160,7 +5160,7 @@ If given a numerical ARG, move forward ARG pages." If end of article, return non-nil. Otherwise return nil. Argument LINES specifies lines to be scrolled up." (interactive "p") - (move-to-window-line -1) + (move-to-window-line (max (- -1 scroll-margin) (- -1 (window-body-height)))) (if (save-excursion (end-of-line) (and (pos-visible-in-window-p) ;Not continuation line. @@ -5189,13 +5189,13 @@ Argument LINES specifies lines to be scrolled up." (end-of-buffer ;; Long lines may cause an end-of-buffer error. (goto-char (point-max))))) - (move-to-window-line 0)) + (move-to-window-line (min scroll-margin (window-body-height)))) (defun gnus-article-prev-page (&optional lines) "Show previous page of current article. Argument LINES specifies lines to be scrolled down." (interactive "p") - (move-to-window-line 0) + (move-to-window-line (min scroll-margin (window-body-height))) (if (and gnus-page-broken (bobp) (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? @@ -5209,7 +5209,7 @@ Argument LINES specifies lines to be scrolled down." (scroll-down lines) (beginning-of-buffer (goto-char (point-min)))) - (move-to-window-line 0))))) + (move-to-window-line (min scroll-margin (window-body-height))))))) (defun gnus-article-only-boring-p () "Decide whether there is only boring text remaining in the article. -- 2.39.2