1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(mouse-wheel-*-event): Minor cleanups

* lisp/mwheel.el (mwheel-event-button): Mark as obsolete alias.
Change all callers.

* lisp/edmacro.el (mouse-wheel-*-event): Move declarations to ...
(edmacro-fix-menu-commands): ... where we do know that they should
be defined.  Obey `mouse-wheel-*-alternate-event`s as well.
This commit is contained in:
Stefan Monnier 2024-01-09 11:34:05 -05:00
parent 0a5ebd444a
commit ee2a8fd4cf
2 changed files with 19 additions and 19 deletions

View file

@ -720,17 +720,19 @@ This function assumes that the events can be stored in a string."
(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)
@ -748,7 +750,11 @@ This function assumes that the events can be stored in a string."
(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