diff lisp/gnus/gnus-art.el @ 85888:ff86fe6b4194

Merge from gnus--devo--0 Patches applied: * gnus--devo--0 (patch 404-406) - Merge from gnus--rel--5.10 - Update from CVS * gnus--rel--5.10 (patch 266) - Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-919
author Miles Bader <miles@gnu.org>
date Fri, 02 Nov 2007 01:38:49 +0000
parents a3af441f6431
children 1cdfc94602cb 880960b70474
line wrap: on
line diff
--- a/lisp/gnus/gnus-art.el	Thu Nov 01 18:29:09 2007 +0000
+++ b/lisp/gnus/gnus-art.el	Fri Nov 02 01:38:49 2007 +0000
@@ -5893,10 +5893,16 @@
 Argument LINES specifies lines to be scrolled up."
   (interactive "p")
   (move-to-window-line -1)
-  (if (save-excursion
-	(end-of-line)
-	(and (pos-visible-in-window-p)	;Not continuation line.
-	     (>= (1+ (point)) (point-max)))) ;Allow for trailing newline.
+  (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)))))
+	   (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
@@ -5956,7 +5962,14 @@
       (progn
 	(gnus-narrow-to-page -1)	;Go to previous page.
 	(goto-char (point-max))
-	(recenter -1))
+	(recenter (if gnus-article-over-scroll
+		      (if lines
+			  (max (+ lines (or (and (boundp 'scroll-margin)
+						 (symbol-value 'scroll-margin))
+					    0))
+			       3)
+			(- (window-height) 2))
+		    -1)))
     (prog1
 	(condition-case ()
 	    (let ((scroll-in-place nil))
@@ -7181,6 +7194,7 @@
 		       (repeat :tag "Par"
 			       :inline t
 			       (integer :tag "Regexp group")))))
+(put 'gnus-button-alist 'risky-local-variable t)
 
 (defcustom gnus-header-button-alist
   '(("^\\(References\\|Message-I[Dd]\\|^In-Reply-To\\):" "<[^<>]+>"
@@ -7220,6 +7234,7 @@
 		       (repeat :tag "Par"
 			       :inline t
 			       (integer :tag "Regexp group")))))
+(put 'gnus-header-button-alist 'risky-local-variable t)
 
 ;;; Commands: