From bba80faf87a6a732a648a629381a51ec8164b7e0 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 8 Jul 2019 17:59:51 +0200 Subject: [PATCH] Declare mwheel-install obsolete (Bug#36553) * lisp/mwheel.el: Update `Commentary' section. (mwheel-install): Declare obsolete in favor of mouse-wheel-mode. * etc/NEWS: Announce it. --- etc/NEWS | 7 +++++++ lisp/mwheel.el | 21 +++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index afdcf56b6c0..c875fc693c8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1701,6 +1701,13 @@ needing to advice 'ispell-change-dictionary'. This command is bound to 'S-down' and scrolls the buffer up in particular when the end of the buffer is visible in the window. +** mwheel.el + +--- +*** 'mwheel-install' is now obsolete. +Use 'mouse-wheel-mode' instead. Note that 'mouse-wheel-mode' is +already enabled by default on most graphical displays. + * New Modes and Packages in Emacs 27.1 diff --git a/lisp/mwheel.el b/lisp/mwheel.el index eb665632ffe..dfea55374b0 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -21,22 +21,22 @@ ;;; Commentary: -;; This code will enable the use of the infamous 'wheel' on the new -;; crop of mice. Under XFree86 and the XSuSE X Servers, the wheel -;; events are sent as button4/button5 events. +;; This enables the use of the mouse wheel (or scroll wheel) in Emacs. +;; Under X11/X.Org, the wheel events are sent as button4/button5 +;; events. +;; It is already enabled by default on most graphical displays. You +;; can toggle it with M-x mouse-wheel-mode. + +;;; Code: + +;; Implementation note: +;; ;; I for one would prefer some way of converting the button4/button5 ;; events into different event types, like 'mwheel-up' or ;; 'mwheel-down', but I cannot find a way to do this very easily (or ;; portably), so for now I just live with it. -;; To enable this code, simply put this at the top of your .emacs -;; file: -;; -;; (mouse-wheel-mode 1) - -;;; Code: - (require 'custom) (require 'timer) @@ -334,6 +334,7 @@ non-Windows systems." ;; preloaded ;;;###autoload (defun mwheel-install (&optional uninstall) "Enable mouse wheel support." + (declare (obsolete mouse-wheel-mode "27.1")) (mouse-wheel-mode (if uninstall -1 1))) (provide 'mwheel) -- 2.39.2