aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier1999-11-19 20:18:47 +0000
committerStefan Monnier1999-11-19 20:18:47 +0000
commitd294c01f599fb45accd879fabc0d23a6daa4acef (patch)
tree2d5eb52ac105ab1e73c5943d9595da5576a25a21
parenta9fb0b79abd70f29a2d5244d64d2b3ae1a465b0d (diff)
downloademacs-d294c01f599fb45accd879fabc0d23a6daa4acef.tar.gz
emacs-d294c01f599fb45accd879fabc0d23a6daa4acef.zip
(scroll-bar-toolkit-scroll): add handling of the `ratio'
event for Xaw and Xaw3d(without arrows) scrollbars.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/scroll-bar.el9
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8079b444a7a..f98b3712c25 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
11999-11-19 Stefan Monnier <monnier@cs.yale.edu> 11999-11-19 Stefan Monnier <monnier@cs.yale.edu>
2 2
3 * scroll-bar.el (scroll-bar-toolkit-scroll): add handling of the `ratio'
4 event for Xaw and Xaw3d(without arrows) scrollbars.
5
3 * files.el (auto-mode-alist): add patterns for diff-mode. 6 * files.el (auto-mode-alist): add patterns for diff-mode.
4 7
5 * complete.el (PC-do-complete-and-exit): use minibuffer-prompt-end to 8 * complete.el (PC-do-complete-and-exit): use minibuffer-prompt-end to
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index 4499c0b0b5f..aea8c8e72f5 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -316,6 +316,13 @@ EVENT should be a scroll bar click."
316 (scroll-up '-)) 316 (scroll-up '-))
317 ((eq part 'below-handle) 317 ((eq part 'below-handle)
318 (scroll-up nil)) 318 (scroll-up nil))
319 ((eq part 'ratio)
320 (let* ((portion-whole (nth 2 end-position))
321 (lines (scroll-bar-scale portion-whole
322 (1- (window-height)))))
323 (scroll-up (cond ((not (zerop lines)) lines)
324 ((< (car portion-whole) 0) -1)
325 (t 1)))))
319 ((eq part 'up) 326 ((eq part 'up)
320 (scroll-up -1)) 327 (scroll-up -1))
321 ((eq part 'down) 328 ((eq part 'down)
@@ -330,7 +337,7 @@ EVENT should be a scroll bar click."
330 (sit-for 0) 337 (sit-for 0)
331 (unless scroll-bar-timer 338 (unless scroll-bar-timer
332 (setq scroll-bar-timer 339 (setq scroll-bar-timer
333 (run-with-timer 0.1 0.1 'xt-process-timeouts))) 340 (run-with-timer 0.1 0.1 'xt-process-timeouts)))
334 (with-current-buffer (window-buffer window) 341 (with-current-buffer (window-buffer window)
335 (setq point-before-scroll before-scroll)))))) 342 (setq point-before-scroll before-scroll))))))
336 343