[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master bba80fa 1/3: Declare mwheel-install obsolete (Bug#3
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master bba80fa 1/3: Declare mwheel-install obsolete (Bug#36553) |
Date: |
Thu, 18 Jul 2019 20:07:25 -0400 (EDT) |
branch: master
commit bba80faf87a6a732a648a629381a51ec8164b7e0
Author: Stefan Kangas <address@hidden>
Commit: Noam Postavsky <address@hidden>
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 afdcf56..c875fc6 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 eb66563..dfea553 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)