Mercurial > hg > xemacs-beta
diff lisp/keydefs.el @ 4315:26ec8d0f3a9c
Bind mouse wheel movements by default,
to a lambda that calls the autoloaded #'mwheel-install and then
#'mwheel-scrool with the appropriate event.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 08 Dec 2007 13:18:49 +0100 |
parents | dd935ef485d2 |
children | 9e28067e3083 |
line wrap: on
line diff
--- a/lisp/keydefs.el Fri Dec 07 13:32:19 2007 -0500 +++ b/lisp/keydefs.el Sat Dec 08 13:18:49 2007 +0100 @@ -674,4 +674,12 @@ ;(define-key global-map 'insertchar 'function-key-error) (define-key global-map 'deletechar 'delete-char) +;; Bind the mouse wheel by default. +(dolist (keyspec '([(mouse-4)] [(shift mouse-4)] [(control mouse-4)] + [(mouse-5)] [(shift mouse-5)] [(control mouse-5)])) + (define-key global-map keyspec + #'(lambda (event) + (interactive "e") + (mwheel-install) + (declare-fboundp (mwheel-scroll event))))) ;;; keydefs.el ends here