changeset 64643:5ecf32f96408

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-498 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 96) - Update from CVS 2005-07-26 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/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.
author Miles Bader <miles@gnu.org>
date Wed, 27 Jul 2005 01:46:58 +0000
parents 6baf27bdd63b
children 734c19798185
files lisp/gnus/ChangeLog lisp/gnus/gnus-art.el
diffstat 2 files changed, 21 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Wed Jul 27 01:31:21 2005 +0000
+++ b/lisp/gnus/ChangeLog	Wed Jul 27 01:46:58 2005 +0000
@@ -1,3 +1,9 @@
+2005-07-26  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* 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  <yamaoka@jpl.org>
 
 	* gnus-art.el (gnus-article-next-page): Revert.
--- a/lisp/gnus/gnus-art.el	Wed Jul 27 01:31:21 2005 +0000
+++ b/lisp/gnus/gnus-art.el	Wed Jul 27 01:46:58 2005 +0000
@@ -5197,13 +5197,17 @@
 			 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.
@@ -5217,13 +5221,13 @@
 	(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.