From f670aa3beef370ad854db0523a03513c2a970b43 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 26 Jul 2005 02:30:46 +0000 Subject: [PATCH] Synch to No Gnus 200507260230. --- lisp/ChangeLog | 6 ++++++ lisp/gnus-art.el | 26 +++++++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6953769..88c9b62 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-07-26 Katsumi Yamaoka + + * gnus-art.el (gnus-article-next-page-1): Don't scroll if there're + fewer lines than that of scroll-margin. + (gnus-article-prev-page): Narrow the range to bind scroll-in-place. + 2005-07-25 Katsumi Yamaoka * gnus-art.el (gnus-article-next-page): Revert. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 89e02a6..ff16e77 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -5551,13 +5551,17 @@ specifies." (if header-line-format 1 0))))))) (defun gnus-article-next-page-1 (lines) - (let ((scroll-in-place nil)) + (unless (and (not (featurep 'xemacs)) + (> (symbol-value 'scroll-margin) 0) + (<= (count-lines (window-start) (point-max)) + (symbol-value 'scroll-margin))) (condition-case () - (scroll-up lines) + (let ((scroll-in-place nil)) + (scroll-up lines)) (end-of-buffer ;; Long lines may cause an end-of-buffer error. - (goto-char (point-max))))) - (gnus-article-beginning-of-window)) + (goto-char (point-max)))) + (gnus-article-beginning-of-window))) (defun gnus-article-prev-page (&optional lines) "Show previous page of current article. @@ -5571,13 +5575,13 @@ Argument LINES specifies lines to be scrolled down." (gnus-narrow-to-page -1) ;Go to previous page. (goto-char (point-max)) (recenter -1)) - (let ((scroll-in-place nil)) - (prog1 - (condition-case () - (scroll-down lines) - (beginning-of-buffer - (goto-char (point-min)))) - (gnus-article-beginning-of-window))))) + (prog1 + (condition-case () + (let ((scroll-in-place nil)) + (scroll-down lines)) + (beginning-of-buffer + (goto-char (point-min)))) + (gnus-article-beginning-of-window)))) (defun gnus-article-only-boring-p () "Decide whether there is only boring text remaining in the article. -- 1.7.10.4