Mercurial > hg > xemacs-beta
changeset 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 | f95358fda5d8 |
children | 2e528ccfe690 |
files | lisp/ChangeLog lisp/keydefs.el |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Dec 07 13:32:19 2007 -0500 +++ b/lisp/ChangeLog Sat Dec 08 13:18:49 2007 +0100 @@ -1,3 +1,10 @@ +2007-12-04 Aidan Kehoe <kehoea@parhasard.net> + + * keydefs.el: + Bind mouse wheel movements by default, to a lambda that calls the + autoloaded #'mwheel-install and then #'mwheel-scrool with the + appropriate event. + 2007-12-07 Vin Shelton <acs@xemacs.org> * about.el: Minor bio update to test hg repository.
--- 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