;;; -*-Scheme-*-
;;;
-;;; $Id: modefs.scm,v 1.158 2000/03/25 18:49:16 cph Exp $
+;;; $Id: modefs.scm,v 1.159 2000/06/11 04:24:36 cph Exp $
;;;
;;; Copyright (c) 1985, 1989-2000 Massachusetts Institute of Technology
;;;
;;; Mouse buttons:
(define-key 'fundamental button1-down 'mouse-set-point)
+;; Next two are for wheel mouse under X.
+(define-key 'fundamental button4-down 'mouse-scroll-down)
+(define-key 'fundamental button5-down 'mouse-scroll-up)
(define-key 'fundamental button1-up 'mouse-ignore)
(define-key 'fundamental button2-up 'mouse-ignore)
(define-key 'fundamental button3-up 'mouse-ignore)
;;; -*-Scheme-*-
;;;
-;;; $Id: mousecom.scm,v 1.3 1999/01/28 04:16:34 cph Exp $
+;;; $Id: mousecom.scm,v 1.4 2000/06/11 04:24:30 cph Exp $
;;;
-;;; Copyright (c) 1989-1999 Massachusetts Institute of Technology
+;;; Copyright (c) 1989-2000 Massachusetts Institute of Technology
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
(buffer-end (window-buffer window)))))
(push-current-mark! mark)
(mark-flash mark))))))
-
+\f
(define-command mouse-show-event
"Show the mouse position in the minibuffer."
()
" x: " (button-event/x button-event)
" y: " (button-event/y button-event)))))
+(define-command mouse-scroll-up
+ "Scroll up mouse-scroll-increment lines."
+ ()
+ (lambda ()
+ (scroll-window (selected-window)
+ (ref-variable mouse-scroll-increment)
+ (lambda () unspecific))))
+
+(define-command mouse-scroll-down
+ "Scroll down mouse-scroll-increment lines."
+ ()
+ (lambda ()
+ (scroll-window (selected-window)
+ (- (ref-variable mouse-scroll-increment))
+ (lambda () unspecific))))
+
+(define-variable mouse-scroll-increment
+ "Number of lines by which a mouse-scroll event moves."
+ 10
+ exact-nonnegative-integer?)
+
(define-command mouse-ignore
"Don't do anything."
()