summaryrefslogtreecommitdiff
path: root/lisp/mwheel.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-03-02 11:59:46 -0800
committerGlenn Morris <rgm@gnu.org>2018-03-02 11:59:46 -0800
commit762ea10d7ff483d3528c2c85b42596178ccc2a34 (patch)
tree00154b726c2bd73c85d47f89a2912bd2ff389b92 /lisp/mwheel.el
parente943b9b514fcc82a47364a35e4af9f46e30e7346 (diff)
parent0213c8bf472b196d995d92a52b44458ac8226e42 (diff)
downloademacs-762ea10d7ff483d3528c2c85b42596178ccc2a34.tar.gz
Merge from origin/emacs-26
0213c8b (origin/emacs-26) mwheel minor consistency fix 82f12b2 * src/window.c (Frecenter): Improve commentary. 04da8f4 Fix downloading non-text files in EWW 832b9ec ; Spelling fixes dd88499 ; Spelling fixes 3968f72 Rename some mwheel options, for consistency d6e78de * lisp/vc/add-log.el (add-change-log-entry): Replace obsolete... 5fe0387 Improve the Emacs manual 56ab8e3 * lisp/dired-aux.el (dired-do-create-files): Doc fix. (Bug#3... Conflicts: etc/NEWS lisp/mwheel.el
Diffstat (limited to 'lisp/mwheel.el')
-rw-r--r--lisp/mwheel.el30
1 files changed, 12 insertions, 18 deletions
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index cbd78137622..44c4989ad06 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -150,30 +150,18 @@ This can be slightly disconcerting, but some people prefer it."
;;; For tilt-scroll
;;;
-(defcustom mwheel-tilt-scroll-p nil
+(defcustom mouse-wheel-tilt-scroll nil
"Enable scroll using tilting mouse wheel."
:group 'mouse
:type 'boolean
:version "26.1")
-(defcustom mwheel-flip-direction nil
+(defcustom mouse-wheel-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)
@@ -211,6 +199,12 @@ 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 mwheel-scroll-left-function 'scroll-left
+ "Function that does the job of scrolling left.")
+
+(defvar mwheel-scroll-right-function 'scroll-right
+ "Function that does the job of scrolling right.")
+
(defvar mouse-wheel-left-event
(if (or (featurep 'w32-win) (featurep 'ns-win))
'wheel-left
@@ -293,13 +287,13 @@ non-Windows systems."
;; Make sure we do indeed scroll to the end of the buffer.
(end-of-buffer (while t (funcall mwheel-scroll-up-function)))))
((eq button mouse-wheel-left-event) ; for tilt scroll
- (when mwheel-tilt-scroll-p
- (funcall (if mwheel-flip-direction
+ (when mouse-wheel-tilt-scroll
+ (funcall (if mouse-wheel-flip-direction
mwheel-scroll-right-function
mwheel-scroll-left-function) amt)))
((eq button mouse-wheel-right-event) ; for tilt scroll
- (when mwheel-tilt-scroll-p
- (funcall (if mwheel-flip-direction
+ (when mouse-wheel-tilt-scroll
+ (funcall (if mouse-wheel-flip-direction
mwheel-scroll-left-function
mwheel-scroll-right-function) amt)))
(t (error "Bad binding in mwheel-scroll"))))