+2008-08-11 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lpath.el: Bind scroll-margin for XEmacs 21.4 and SXEmacs.
+
+ * gnus-art.el (gnus-article-next-page, gnus-article-prev-page)
+ (gnus-article-next-page-1): Use compiler directive (featurep 'xemacs).
+ (gnus-article-beginning-of-window): Fix calculation.
+
2008-08-08 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-msg.el (gnus-summary-supersede-article)
(move-to-window-line -1)
(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.
(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.
- (setq lines (min lines
- (max 0 (- (count-lines (window-start) (point-max))
- (symbol-value 'scroll-margin))))))
+ (when (and (numberp lines)
+ (> lines 0)
+ (> scroll-margin 0))
+ (setq lines (min lines
+ (max 0 (- (count-lines (window-start) (point-max))
+ scroll-margin))))))
(condition-case ()
(let ((scroll-in-place nil))
(scroll-up lines))
(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)))
get-display-table put-display-table select-frame-set-input-focus
unicode-precedence-list w32-focus-frame x-focus-frame))
(maybe-bind
- '(default-file-name-coding-system)))
+ '(default-file-name-coding-system scroll-margin)))
(when (and (= emacs-major-version 21) (= emacs-minor-version 4))
(maybe-fbind