Mercurial > emacs
comparison lisp/mwheel.el @ 104295:f03494acbd1b
* mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event): Don't
initialize based on window-system (Bug#4124).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 16 Aug 2009 05:49:26 +0000 |
parents | a9dc0e7c3f2b |
children | c545eaa5edad |
comparison
equal
deleted
inserted
replaced
104294:6ee860194ef5 | 104295:f03494acbd1b |
---|---|
55 (defvar mouse-wheel-down-button 4) | 55 (defvar mouse-wheel-down-button 4) |
56 (make-obsolete-variable 'mouse-wheel-down-button | 56 (make-obsolete-variable 'mouse-wheel-down-button |
57 'mouse-wheel-down-event | 57 'mouse-wheel-down-event |
58 "22.1") | 58 "22.1") |
59 (defcustom mouse-wheel-down-event | 59 (defcustom mouse-wheel-down-event |
60 ;; In the latest versions of XEmacs, we could just use mouse-%s as well. | 60 (if (or (featurep 'w32-win) (featurep 'ns-win)) |
61 (if (memq window-system '(w32 ns)) | |
62 'wheel-up | 61 'wheel-up |
63 (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") | 62 (intern (format "mouse-%s" mouse-wheel-down-button))) |
64 mouse-wheel-down-button))) | |
65 "Event used for scrolling down." | 63 "Event used for scrolling down." |
66 :group 'mouse | 64 :group 'mouse |
67 :type 'symbol | 65 :type 'symbol |
68 :set 'mouse-wheel-change-button) | 66 :set 'mouse-wheel-change-button) |
69 | 67 |
70 (defvar mouse-wheel-up-button 5) | 68 (defvar mouse-wheel-up-button 5) |
71 (make-obsolete-variable 'mouse-wheel-up-button | 69 (make-obsolete-variable 'mouse-wheel-up-button |
72 'mouse-wheel-up-event | 70 'mouse-wheel-up-event |
73 "22.1") | 71 "22.1") |
74 (defcustom mouse-wheel-up-event | 72 (defcustom mouse-wheel-up-event |
75 ;; In the latest versions of XEmacs, we could just use mouse-%s as well. | 73 (if (or (featurep 'w32-win) (featurep 'ns-win)) |
76 (if (memq window-system '(w32 ns)) | |
77 'wheel-down | 74 'wheel-down |
78 (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") | 75 (intern (format "mouse-%s" mouse-wheel-up-button))) |
79 mouse-wheel-up-button))) | |
80 "Event used for scrolling up." | 76 "Event used for scrolling up." |
81 :group 'mouse | 77 :group 'mouse |
82 :type 'symbol | 78 :type 'symbol |
83 :set 'mouse-wheel-change-button) | 79 :set 'mouse-wheel-change-button) |
84 | 80 |
85 (defvar mouse-wheel-click-button 2) | 81 (defvar mouse-wheel-click-button 2) |
86 (make-obsolete-variable 'mouse-wheel-click-button | 82 (make-obsolete-variable 'mouse-wheel-click-button |
87 'mouse-wheel-click-event | 83 'mouse-wheel-click-event |
88 "22.1") | 84 "22.1") |
89 (defcustom mouse-wheel-click-event | 85 (defcustom mouse-wheel-click-event |
90 ;; In the latest versions of XEmacs, we could just use mouse-%s as well. | 86 (intern (format "mouse-%s" mouse-wheel-click-button)) |
91 (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") | |
92 mouse-wheel-click-button)) | |
93 "Event that should be temporarily inhibited after mouse scrolling. | 87 "Event that should be temporarily inhibited after mouse scrolling. |
94 The mouse wheel is typically on the mouse-2 button, so it may easily | 88 The mouse wheel is typically on the mouse-2 button, so it may easily |
95 happen that text is accidentally yanked into the buffer when | 89 happen that text is accidentally yanked into the buffer when |
96 scrolling with the mouse wheel. To prevent that, this variable can be | 90 scrolling with the mouse wheel. To prevent that, this variable can be |
97 set to the event sent when clicking on the mouse wheel button." | 91 set to the event sent when clicking on the mouse wheel button." |