(gnus-article-next-page-1): New function.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 15 Apr 2003 22:15:42 +0000 (22:15 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 15 Apr 2003 22:15:42 +0000 (22:15 +0000)
(gnus-article-next-page): Use it.

lisp/ChangeLog
lisp/gnus-art.el

index 09c67a1..da31cf5 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-art.el (gnus-article-next-page-1): New function.
+       (gnus-article-next-page): Use it.
+
 2003-04-15  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-split): added save-restriction to save-excursion
index 01a8eeb..918cdc2 100644 (file)
@@ -4899,29 +4899,34 @@ 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)
-  (if (and (not gnus-article-over-scroll)
-          (save-excursion
-            (end-of-line)
-            (and (pos-visible-in-window-p)     ;Not continuation line.
-                 (>= (1+ (point)) (point-max))))) ;Allow for trailing newline.
+  (if (save-excursion
+       (end-of-line)
+       (and (pos-visible-in-window-p)  ;Not continuation line.
+            (>= (1+ (point)) (point-max)))) ;Allow for trailing newline.
       ;; Nothing in this page.
       (if (or (not gnus-page-broken)
              (save-excursion
                (save-restriction
                  (widen) (forward-line 1) (eobp)))) ;Real end-of-buffer?
-         t                             ;Nothing more.
+         (progn
+           (when gnus-article-over-scroll
+             (gnus-article-next-page-1 lines))
+           t)                  ;Nothing more.
        (gnus-narrow-to-page 1)         ;Go to next page.
        nil)
     ;; More in this page.
-    (let ((scroll-in-place nil))
-      (condition-case ()
-         (scroll-up lines)
-       (end-of-buffer
-        ;; Long lines may cause an end-of-buffer error.
-        (goto-char (point-max)))))
-    (move-to-window-line 0)
+    (gnus-article-next-page-1 lines)
     nil))
 
+(defun gnus-article-next-page-1 (lines)
+  (let ((scroll-in-place nil))
+    (condition-case ()
+       (scroll-up lines)
+      (end-of-buffer
+       ;; Long lines may cause an end-of-buffer error.
+       (goto-char (point-max)))))
+  (move-to-window-line 0))
+
 (defun gnus-article-prev-page (&optional lines)
   "Show previous page of current article.
 Argument LINES specifies lines to be scrolled down."