Mercurial > hg > xemacs-beta
comparison lisp/mwheel.el @ 265:8efd647ea9ca r20-5b31
Import from CVS: tag r20-5b31
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:25:37 +0200 |
parents | 727739f917cb |
children | a4f53d9b3154 |
comparison
equal
deleted
inserted
replaced
264:682d2a9d41a5 | 265:8efd647ea9ca |
---|---|
98 (if curwin (select-window curwin)))) | 98 (if curwin (select-window curwin)))) |
99 | 99 |
100 ;;;###autoload | 100 ;;;###autoload |
101 (defun mwheel-install () | 101 (defun mwheel-install () |
102 "Enable mouse wheel support." | 102 "Enable mouse wheel support." |
103 (let ((mwheel-running-xemacs (string-match "XEmacs" (emacs-version))) | 103 (let ((keys '([(mouse-4)] [(shift mouse-4)] [(mouse-5)] [(shift mouse-5)]))) |
104 (keys (if mwheel-running-xemacs | |
105 '(button4 [(shift button4)] button5 [(shift button5)]) | |
106 '([mouse-4] [S-mouse-4] [mouse-5] [S-mouse-5])))) | |
107 ;; This condition-case is here because Emacs 19 will throw an error | 104 ;; This condition-case is here because Emacs 19 will throw an error |
108 ;; if you try to define a key that it does not know about. I for one | 105 ;; if you try to define a key that it does not know about. I for one |
109 ;; prefer to just unconditionally do a mwheel-install in my .emacs, so | 106 ;; prefer to just unconditionally do a mwheel-install in my .emacs, so |
110 ;; that if the wheeled-mouse is there, it just works, and this way it | 107 ;; that if the wheeled-mouse is there, it just works, and this way it |
111 ;; doesn't yell at me if I'm on my laptop or another machine, etc. | 108 ;; doesn't yell at me if I'm on my laptop or another machine, etc. |