emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master fe9b612: Quieten without-x mwheel.el compilation


From: Glenn Morris
Subject: [Emacs-diffs] master fe9b612: Quieten without-x mwheel.el compilation
Date: Mon, 26 Feb 2018 17:05:11 -0500 (EST)

branch: master
commit fe9b612123cbcb74b79c3f8eb4043a1ad3ebb3a6
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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.
---
 lisp/mwheel.el | 77 +++++++++++++++++++++++++++++-----------------------------
 1 file changed, 38 insertions(+), 39 deletions(-)

diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 9718ab8..cbd78137 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -148,6 +148,32 @@ This can be slightly disconcerting, but some people prefer 
it."
   :group 'mouse
   :type 'boolean)
 
+;;; For tilt-scroll
+;;;
+(defcustom mwheel-tilt-scroll-p nil
+  "Enable scroll using tilting mouse wheel."
+  :group 'mouse
+  :type 'boolean
+  :version "26.1")
+
+(defcustom mwheel-flip-direction nil
+  "Swap direction of 'wheel-right and 'wheel-left."
+  :group 'mouse
+  :type 'boolean
+  :version "26.1")
+
+(defcustom mwheel-scroll-left-function 'scroll-left
+  "Function that does the job of scrolling left."
+  :group 'mouse
+  :type 'function
+  :version "26.1")
+
+(defcustom mwheel-scroll-right-function 'scroll-right
+  "Function that does the job of scrolling right."
+  :group 'mouse
+  :type 'function
+  :version "26.1")
+
 (eval-and-compile
   (if (fboundp 'event-button)
       (fset 'mwheel-event-button 'event-button)
@@ -185,6 +211,18 @@ This can be slightly disconcerting, but some people prefer 
it."
 (defvar mwheel-scroll-down-function 'scroll-down
   "Function that does the job of scrolling downward.")
 
+(defvar mouse-wheel-left-event
+  (if (or (featurep 'w32-win) (featurep 'ns-win))
+      'wheel-left
+    (intern "mouse-6"))
+  "Event used for scrolling left.")
+
+(defvar mouse-wheel-right-event
+  (if (or (featurep 'w32-win) (featurep 'ns-win))
+      'wheel-right
+    (intern "mouse-7"))
+  "Event used for scrolling right.")
+
 (defun mwheel-scroll (event)
   "Scroll up or down according to the EVENT.
 This 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."
   "Enable mouse wheel support."
   (mouse-wheel-mode (if uninstall -1 1)))
 
-
-;;; For tilt-scroll
-;;;
-(defcustom mwheel-tilt-scroll-p nil
-  "Enable scroll using tilting mouse wheel."
-  :group 'mouse
-  :type 'boolean
-  :version "26.1")
-
-(defcustom mwheel-flip-direction nil
-  "Swap direction of 'wheel-right and 'wheel-left."
-  :group 'mouse
-  :type 'boolean
-  :version "26.1")
-
-(defcustom mwheel-scroll-left-function 'scroll-left
-  "Function that does the job of scrolling left."
-  :group 'mouse
-  :type 'function
-  :version "26.1")
-
-(defcustom mwheel-scroll-right-function 'scroll-right
-  "Function that does the job of scrolling right."
-  :group 'mouse
-  :type 'function
-  :version "26.1")
-
-(defvar mouse-wheel-left-event
-  (if (or (featurep 'w32-win) (featurep 'ns-win))
-      'wheel-left
-    (intern "mouse-6"))
-  "Event used for scrolling left.")
-
-(defvar mouse-wheel-right-event
-  (if (or (featurep 'w32-win) (featurep 'ns-win))
-      'wheel-right
-    (intern "mouse-7"))
-  "Event used for scrolling right.")
-
 (provide 'mwheel)
 
 ;;; mwheel.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]