Mercurial > emacs
comparison lisp/mwheel.el @ 44121:8f34ebe4ff92
(mouse-wheel-mode): Use the result of current-global-map instead of the
variable `global-map'.
author | Pavel Janík <Pavel@Janik.cz> |
---|---|
date | Sun, 24 Mar 2002 15:25:11 +0000 |
parents | 0f257be5fa6a |
children | d8a6c969ea05 |
comparison
equal
deleted
inserted
replaced
44120:a7b556a4c61a | 44121:8f34ebe4ff92 |
---|---|
167 ;; that if the wheeled-mouse is there, it just works, and this way it | 167 ;; that if the wheeled-mouse is there, it just works, and this way it |
168 ;; doesn't yell at me if I'm on my laptop or another machine, etc. | 168 ;; doesn't yell at me if I'm on my laptop or another machine, etc. |
169 (condition-case () | 169 (condition-case () |
170 (dolist (key keys) | 170 (dolist (key keys) |
171 (cond (mouse-wheel-mode | 171 (cond (mouse-wheel-mode |
172 (define-key global-map key 'mwheel-scroll)) | 172 (define-key (current-global-map) key 'mwheel-scroll)) |
173 ((eq (lookup-key global-map key) 'mwheel-scroll) | 173 ((eq (lookup-key (current-global-map) key) 'mwheel-scroll) |
174 (define-key global-map key nil)))) | 174 (define-key (current-global-map) key nil)))) |
175 (error nil)))) | 175 (error nil)))) |
176 | 176 |
177 ;;; Compatibility entry point | 177 ;;; Compatibility entry point |
178 ;;;###autoload | 178 ;;;###autoload |
179 (defun mwheel-install (&optional uninstall) | 179 (defun mwheel-install (&optional uninstall) |