]> git.eshelyaron.com Git - emacs.git/commitdiff
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-492
authorMiles Bader <miles@gnu.org>
Fri, 22 Jul 2005 08:22:41 +0000 (08:22 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 22 Jul 2005 08:22:41 +0000 (08:22 +0000)
Merge from gnus--rel--5.10

Patches applied:

 * gnus--rel--5.10  (patch 92-94)

   - Merge from emacs--cvs-trunk--0
   - Update from CVS

2005-07-15  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/gnus-art.el (gnus-article-next-page): Use gnus-end-of-window.
   (gnus-article-next-page-1): Use gnus-beginning-of-window.
   (gnus-article-prev-page): Ditto.

   * lisp/gnus/gnus-util.el (gnus-beginning-of-window): New function.
   (gnus-end-of-window): New function.

lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/gnus-util.el

index 0e6e4ae283eed60cfa3c7ecc465364e32c63c00a..33f639380a658e04d44b20b1af01ea6dfb536e14 100644 (file)
        save-selected-window-window hackery because it relies on
        save-selected-window internals.
 
+2005-07-15  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-next-page): Use gnus-end-of-window.
+       (gnus-article-next-page-1): Use gnus-beginning-of-window.
+       (gnus-article-prev-page): Ditto.
+
+       * gnus-util.el (gnus-beginning-of-window): New function.
+       (gnus-end-of-window): New function.
+
 2005-07-13  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-salt.el (gnus-pick-mode): Remove the 5th arg of
index 82f06d2f5a2d95c3adaa37caa21382b8294fdad2..2be1afea77db69073e61929da0f09791f26b8be0 100644 (file)
@@ -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 (max (- -1 scroll-margin) (- -1 (window-body-height))))
+  (gnus-end-of-window)
   (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 (min scroll-margin (window-body-height))))
+  (gnus-beginning-of-window))
 
 (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 (min scroll-margin (window-body-height)))
+  (gnus-beginning-of-window)
   (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 (min scroll-margin (window-body-height)))))))
+       (gnus-beginning-of-window)))))
 
 (defun gnus-article-only-boring-p ()
   "Decide whether there is only boring text remaining in the article.
index da14d52161bdd906a1f90f2da633237c76ab37d5..363b9c2f4a030935ef6570e864a1c01b90226983 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-util.el --- utility functions for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -1577,6 +1577,30 @@ empty directories from OLD-PATH."
   (defalias 'gnus-set-process-query-on-exit-flag
     'process-kill-without-query))
 
+(defun gnus-beginning-of-window ()
+  "Move point to the beginning of the window."
+  (move-to-window-line
+   (if (featurep 'xemacs)
+       0
+     (min scroll-margin
+         (max 1 (- (window-height)
+                   (if mode-line-format 1 0)
+                   (if (and (boundp 'header-line-format)
+                            (symbol-value 'header-line-format))
+                       1 0)))))))
+
+(defun gnus-end-of-window ()
+  "Move point to the end of the window."
+  (move-to-window-line
+   (if (featurep 'xemacs)
+       -1
+     (max (- -1 scroll-margin)
+         (- -1 (max 1 (- (window-height)
+                         (if mode-line-format 1 0)
+                         (if (and (boundp 'header-line-format)
+                                  (symbol-value 'header-line-format))
+                             1 0))))))))
+
 (provide 'gnus-util)
 
 ;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49