[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-art.el,v |
Date: |
Tue, 12 Aug 2008 16:01:07 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 08/08/12 16:01:06
Index: gnus-art.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/gnus-art.el,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -b -r1.166 -r1.167
--- gnus-art.el 7 Aug 2008 07:18:07 -0000 1.166
+++ gnus-art.el 12 Aug 2008 16:01:06 -0000 1.167
@@ -6113,13 +6113,12 @@
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 (if (featurep 'xemacs) -1 (- -1 scroll-margin)))
(if (and (not (and gnus-article-over-scroll
(> (count-lines (window-start) (point-max))
- (+ (or lines (1- (window-height)))
- (or (and (boundp 'scroll-margin)
- (symbol-value 'scroll-margin))
- 0)))))
+ (if (featurep 'xemacs)
+ (or lines (1- (window-height)))
+ (+ (or lines (1- (window-height))) scroll-margin)))))
(save-excursion
(end-of-line)
(and (pos-visible-in-window-p) ;Not continuation line.
@@ -6151,19 +6150,19 @@
(min (max 0 scroll-margin)
(max 1 (- (window-height)
(if mode-line-format 1 0)
- (if header-line-format 1 0)))))))
+ (if header-line-format 1 0)
+ 2))))))
(defun gnus-article-next-page-1 (lines)
- (when (and (not (featurep 'xemacs))
- (numberp lines)
- (> lines 0)
- (numberp (symbol-value 'scroll-margin))
- (> (symbol-value 'scroll-margin) 0))
+ (unless (featurep 'xemacs)
;; Protect against the bug that Emacs 21.x hangs up when scrolling up for
;; too many number of lines if `scroll-margin' is set as two or greater.
+ (when (and (numberp lines)
+ (> lines 0)
+ (> scroll-margin 0))
(setq lines (min lines
(max 0 (- (count-lines (window-start) (point-max))
- (symbol-value 'scroll-margin))))))
+ scroll-margin))))))
(condition-case ()
(let ((scroll-in-place nil))
(scroll-up lines))
@@ -6185,9 +6184,9 @@
(goto-char (point-max))
(recenter (if gnus-article-over-scroll
(if lines
- (max (+ lines (or (and (boundp 'scroll-margin)
- (symbol-value 'scroll-margin))
- 0))
+ (max (if (featurep 'xemacs)
+ lines
+ (+ lines scroll-margin))
3)
(- (window-height) 2))
-1)))