home *** CD-ROM | disk | FTP | other *** search
- x-gateway: rodan.UU.NET from help-lucid-emacs to alt.lucid-emacs.help; Sat, 12 Sep 1992 03:21:48 EDT
- Message-ID: <9209120721.AA05272@ntu.ac.sg>
- Sender: franks%ntu.ac.sg@lucid.com
- Date: Sat, 12 Sep 1992 15:22:20 +0730
- From: franks%ntu.ac.sg@lucid.com (Frank Siebenlist)
- Subject: mouse scrolling for lemacs 19
- Newsgroups: alt.lucid-emacs.help
- Path: sparky!uunet!wendy-fate.uu.net!help-lucid-emacs
- Lines: 29
-
- The following few lines may make your lifes a little easier
- (until we get our scrollbars....),
- unless you're using hyperbole
- (in which case the interesting parts keep jumping of your screen...).
-
- Enjoy, Frank.
-
- -------------------------cut-here-------------------------------------------
- -
- ;; mouse-scroll-prop.el
- ;; proportional mouse scrolling for lemacs-19
- ;;
- ;; add next three lines to .emacs and modify key assignment to taste:
- ;;(load "mouse-scroll-prop")
- ;;(define-key global-map '(control button2) 'mouse-scroll-up-prop)
- ;;(define-key global-map '(control button3) 'mouse-scroll-down-prop)
-
- (defun mouse-scroll-up-prop (event)
- "Scrolls window up proportionally, i.e. clicked line becomes first line."
- (interactive "@event")
- (scroll-up (- (event-y event) (car (cdr (window-edges))))))
-
- (defun mouse-scroll-down-prop (event)
- "Scrolls window down proportionally, i.e. clicked line becomes last
- line."
- (interactive "@event")
- (scroll-down (- (car (cdr (cdr (cdr (window-edges))))) (event-y event)
- 2)))
-
-