(setf (aref seq i) (logand (aref seq i) 127)))
seq)
-;; These are needed in a --without-x build.
-(defvar mouse-wheel-down-event)
-(defvar mouse-wheel-up-event)
-(defvar mouse-wheel-right-event)
-(defvar mouse-wheel-left-event)
-
(defun edmacro-fix-menu-commands (macro &optional noerror)
(if (vectorp macro)
(let (result)
;; Not preloaded in a --without-x build.
(require 'mwheel)
+ (defvar mouse-wheel-down-event)
+ (defvar mouse-wheel-up-event)
+ (defvar mouse-wheel-right-event)
+ (defvar mouse-wheel-left-event)
+ (defvar mouse-wheel-down-alternate-event)
+ (defvar mouse-wheel-up-alternate-event)
+ (defvar mouse-wheel-right-alternate-event)
+ (defvar mouse-wheel-left-alternate-event)
;; Make a list of the elements.
(setq macro (append macro nil))
(dolist (ev macro)
(memq (event-basic-type ev)
(list mouse-wheel-down-event mouse-wheel-up-event
mouse-wheel-right-event
- mouse-wheel-left-event)))
+ mouse-wheel-left-event
+ mouse-wheel-down-alternate-event
+ mouse-wheel-up-alternate-event
+ mouse-wheel-right-alternate-event
+ mouse-wheel-left-alternate-event)))
nil)
(noerror nil)
(t
:type 'boolean
:version "26.1")
-(defun mwheel-event-button (event)
- (let ((x (event-basic-type event)))
- ;; Map mouse-wheel events to appropriate buttons
- (if (eq 'mouse-wheel x)
- (let ((amount (car (cdr (cdr (cdr event))))))
- (if (< amount 0)
- mouse-wheel-up-event
- mouse-wheel-down-event))
- x)))
+;; This function used to handle the `mouse-wheel` event which was
+;; removed in 2003 by commit 9eb28007fb27, thus making it obsolete.
+(define-obsolete-function-alias 'mwheel-event-button #'event-basic-type "30.1")
(defun mwheel-event-window (event)
(posn-window (event-start event)))
(when (numberp amt) (setq amt (* amt (event-line-count event))))
(condition-case nil
(unwind-protect
- (let ((button (mwheel-event-button event)))
+ (let ((button (event-basic-type event)))
(cond ((and (eq amt 'hscroll) (memq button (list mouse-wheel-down-event
mouse-wheel-down-alternate-event)))
(when (and (natnump arg) (> arg 0))
(interactive (list last-input-event))
(let ((selected-window (selected-window))
(scroll-window (mouse-wheel--get-scroll-window event))
- (button (mwheel-event-button event)))
+ (button (event-basic-type event)))
(select-window scroll-window 'mark-for-redisplay)
(unwind-protect
(cond ((memq button (list mouse-wheel-down-event
"Increase or decrease the global font size according to the EVENT.
This invokes `global-text-scale-adjust', which see."
(interactive (list last-input-event))
- (let ((button (mwheel-event-button event)))
+ (let ((button (event-basic-type event)))
(cond ((memq button (list mouse-wheel-down-event
mouse-wheel-down-alternate-event))
(global-text-scale-adjust 1))