# HG changeset patch # User Stefan Monnier # Date 943042727 0 # Node ID 6866d2a9a4218a3dee08b9b8927ff3e385c0ac16 # Parent 26958042b58dfe658c78ad9fc8ae0fa102c5582a (scroll-bar-toolkit-scroll): add handling of the `ratio' event for Xaw and Xaw3d(without arrows) scrollbars. diff -r 26958042b58d -r 6866d2a9a421 lisp/ChangeLog --- a/lisp/ChangeLog Fri Nov 19 20:14:12 1999 +0000 +++ b/lisp/ChangeLog Fri Nov 19 20:18:47 1999 +0000 @@ -1,5 +1,8 @@ 1999-11-19 Stefan Monnier + * scroll-bar.el (scroll-bar-toolkit-scroll): add handling of the `ratio' + event for Xaw and Xaw3d(without arrows) scrollbars. + * files.el (auto-mode-alist): add patterns for diff-mode. * complete.el (PC-do-complete-and-exit): use minibuffer-prompt-end to diff -r 26958042b58d -r 6866d2a9a421 lisp/scroll-bar.el --- a/lisp/scroll-bar.el Fri Nov 19 20:14:12 1999 +0000 +++ b/lisp/scroll-bar.el Fri Nov 19 20:18:47 1999 +0000 @@ -316,6 +316,13 @@ (scroll-up '-)) ((eq part 'below-handle) (scroll-up nil)) + ((eq part 'ratio) + (let* ((portion-whole (nth 2 end-position)) + (lines (scroll-bar-scale portion-whole + (1- (window-height))))) + (scroll-up (cond ((not (zerop lines)) lines) + ((< (car portion-whole) 0) -1) + (t 1))))) ((eq part 'up) (scroll-up -1)) ((eq part 'down) @@ -330,7 +337,7 @@ (sit-for 0) (unless scroll-bar-timer (setq scroll-bar-timer - (run-with-timer 0.1 0.1 'xt-process-timeouts))) + (run-with-timer 0.1 0.1 'xt-process-timeouts))) (with-current-buffer (window-buffer window) (setq point-before-scroll before-scroll))))))