bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35389: 27.0.50; [PATCH] Emacs on macOS sets mouse-wheel variables di


From: Robert Pluim
Subject: bug#35389: 27.0.50; [PATCH] Emacs on macOS sets mouse-wheel variables directly
Date: Fri, 10 May 2019 17:29:46 +0200

>>>>> On Tue, 23 Apr 2019 13:38:59 +0200, Robert Pluim <rpluim@gmail.com> said:

>>>>> On Tue, 23 Apr 2019 07:17:24 -0400, Noam Postavsky <npostavs@gmail.com> 
>>>>> said:
    Noam> I think it should work to change customized-value to
    Noam> standard-value.

    Robert> That works, thanks. Iʼll run with for a while then push to
    Robert> master.

Having thought about this some more, does it make more sense to put
the value for macOS in the defcustoms for mouse-wheel-scroll-amount
and mouse-wheel-progressive-speed instead? (and discarding the test for
macOS < 10.7 at the same time) i.e.

diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 23f491db0f..4bed5b981d 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -85,7 +85,10 @@ mouse-wheel-inhibit-click-time
   :group 'mouse
   :type 'number)
 
-(defcustom mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil))
+(defcustom mouse-wheel-scroll-amount
+  (if (featurep 'cocoa)
+      '(1 ((shift) . 5) ((control)))
+    '(5 ((shift) . 1) ((control) . nil)))
   "Amount to scroll windows by when spinning the mouse wheel.
 This is an alist mapping the modifier key to the amount to scroll when
 the wheel is moved with the modifier key depressed.
@@ -119,15 +122,20 @@ mouse-wheel-scroll-amount
                     (const :tag "Full screen" :value nil)
                     (integer :tag "Specific # of lines")
                     (float :tag "Fraction of window")))))
-  :set 'mouse-wheel-change-button)
+  :set 'mouse-wheel-change-button
+  :version "27.1")
 
-(defcustom mouse-wheel-progressive-speed t
+(defcustom mouse-wheel-progressive-speed
+  (if (featurep 'cocoa)
+      nil
+    t)
   "If non-nil, the faster the user moves the wheel, the faster the scrolling.
 Note that this has no effect when `mouse-wheel-scroll-amount' specifies
 a \"near full screen\" scroll or when the mouse wheel sends key instead
 of button events."
   :group 'mouse
-  :type 'boolean)
+  :type 'boolean
+  :version "27.1")
 
 (defcustom mouse-wheel-follow-mouse t
   "Whether the mouse wheel should scroll the window that the mouse is over.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]