aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2018-02-26 17:05:04 -0500
committerGlenn Morris2018-02-26 17:05:04 -0500
commitfe9b612123cbcb74b79c3f8eb4043a1ad3ebb3a6 (patch)
treecd9cfe449b1abc37b813535ece8f37e9a082e4cc /lisp
parentf1b2c2311768f6e5d8ad8e55c1daac37546c2f91 (diff)
downloademacs-fe9b612123cbcb74b79c3f8eb4043a1ad3ebb3a6.tar.gz
emacs-fe9b612123cbcb74b79c3f8eb4043a1ad3ebb3a6.zip
Quieten without-x mwheel.el compilation
* lisp/mwheel.el (mwheel-tilt-scroll-p, mwheel-flip-direction) (mwheel-scroll-left-function, mwheel-scroll-right-function) (mouse-wheel-left-event, mouse-wheel-right-event): Move definitions before use.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mwheel.el77
1 files changed, 38 insertions, 39 deletions
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 9718ab87d39..cbd78137622 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -148,6 +148,32 @@ This can be slightly disconcerting, but some people prefer it."
148 :group 'mouse 148 :group 'mouse
149 :type 'boolean) 149 :type 'boolean)
150 150
151;;; For tilt-scroll
152;;;
153(defcustom mwheel-tilt-scroll-p nil
154 "Enable scroll using tilting mouse wheel."
155 :group 'mouse
156 :type 'boolean
157 :version "26.1")
158
159(defcustom mwheel-flip-direction nil
160 "Swap direction of 'wheel-right and 'wheel-left."
161 :group 'mouse
162 :type 'boolean
163 :version "26.1")
164
165(defcustom mwheel-scroll-left-function 'scroll-left
166 "Function that does the job of scrolling left."
167 :group 'mouse
168 :type 'function
169 :version "26.1")
170
171(defcustom mwheel-scroll-right-function 'scroll-right
172 "Function that does the job of scrolling right."
173 :group 'mouse
174 :type 'function
175 :version "26.1")
176
151(eval-and-compile 177(eval-and-compile
152 (if (fboundp 'event-button) 178 (if (fboundp 'event-button)
153 (fset 'mwheel-event-button 'event-button) 179 (fset 'mwheel-event-button 'event-button)
@@ -185,6 +211,18 @@ This can be slightly disconcerting, but some people prefer it."
185(defvar mwheel-scroll-down-function 'scroll-down 211(defvar mwheel-scroll-down-function 'scroll-down
186 "Function that does the job of scrolling downward.") 212 "Function that does the job of scrolling downward.")
187 213
214(defvar mouse-wheel-left-event
215 (if (or (featurep 'w32-win) (featurep 'ns-win))
216 'wheel-left
217 (intern "mouse-6"))
218 "Event used for scrolling left.")
219
220(defvar mouse-wheel-right-event
221 (if (or (featurep 'w32-win) (featurep 'ns-win))
222 'wheel-right
223 (intern "mouse-7"))
224 "Event used for scrolling right.")
225
188(defun mwheel-scroll (event) 226(defun mwheel-scroll (event)
189 "Scroll up or down according to the EVENT. 227 "Scroll up or down according to the EVENT.
190This should be bound only to mouse buttons 4, 5, 6, and 7 on 228This should be bound only to mouse buttons 4, 5, 6, and 7 on
@@ -321,45 +359,6 @@ the mode if ARG is omitted or nil."
321 "Enable mouse wheel support." 359 "Enable mouse wheel support."
322 (mouse-wheel-mode (if uninstall -1 1))) 360 (mouse-wheel-mode (if uninstall -1 1)))
323 361
324
325;;; For tilt-scroll
326;;;
327(defcustom mwheel-tilt-scroll-p nil
328 "Enable scroll using tilting mouse wheel."
329 :group 'mouse
330 :type 'boolean
331 :version "26.1")
332
333(defcustom mwheel-flip-direction nil
334 "Swap direction of 'wheel-right and 'wheel-left."
335 :group 'mouse
336 :type 'boolean
337 :version "26.1")
338
339(defcustom mwheel-scroll-left-function 'scroll-left
340 "Function that does the job of scrolling left."
341 :group 'mouse
342 :type 'function
343 :version "26.1")
344
345(defcustom mwheel-scroll-right-function 'scroll-right
346 "Function that does the job of scrolling right."
347 :group 'mouse
348 :type 'function
349 :version "26.1")
350
351(defvar mouse-wheel-left-event
352 (if (or (featurep 'w32-win) (featurep 'ns-win))
353 'wheel-left
354 (intern "mouse-6"))
355 "Event used for scrolling left.")
356
357(defvar mouse-wheel-right-event
358 (if (or (featurep 'w32-win) (featurep 'ns-win))
359 'wheel-right
360 (intern "mouse-7"))
361 "Event used for scrolling right.")
362
363(provide 'mwheel) 362(provide 'mwheel)
364 363
365;;; mwheel.el ends here 364;;; mwheel.el ends here