[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Smoother macOS touchpad scrolling
From: |
Alan Third |
Subject: |
Re: Smoother macOS touchpad scrolling |
Date: |
Tue, 19 Sep 2017 20:12:03 +0100 |
User-agent: |
Mutt/1.9.0 (2017-09-02) |
On Mon, Sep 18, 2017 at 10:19:30PM +0200, Charles A. Roelli wrote:
> Yes, it returns nil. I think this check (or maybe a function that
> returns the appkit version as an integer) could be added to ns-win.el.
I’m leaving it as an inline check at the moment as we only have a
single use of it just now. If you’re aware of other places it could be
useful, please let me know.
> > (let ((appkit-version (progn
> > (string-match "^appkit-\\([^\s-]*\\)"
> > ns-version-string)
> > (match-string 1 ns-version-string))))
> > (when (and (featurep 'cocoa) (>= (string-to-number appkit-version) 1138))
> > (setq mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control))))
> > (put 'mouse-wheel-scroll-amount 'customized-value
> > (list (custom-quote (symbol-value 'mouse-wheel-scroll-amount))))
> >
> > (setq mouse-wheel-progressive-speed nil)
> > (put 'mouse-wheel-progressive-speed 'customized-value
> > (list (custom-quote (symbol-value
> > 'mouse-wheel-progressive-speed))))))
I’ve pushed (roughly) this to Emacs 26. See below.
> We could also make the defcustoms in mwheel.el look something like
> this:
>
> (defcustom mouse-wheel-scroll-amount
> (cond
> ((and (featurep 'cocoa) (>= (ns-appkit-version) 1138))
> '(1 ((shift) . 5) ((control) . nil)))
> (t '(5 ((shift) . 1) ((control) . nil)))) ...
>
> instead of:
>
> (defcustom mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil)) ...
>
> Then in ns-win.el we could do:
>
> (custom-reevaluate-setting 'mouse-wheel-scroll-amount)
I tried this but it just set mouse-wheel-scroll-amount to nil. It
seems that custom-reevaluate-setting uses the :set function, which is
already in use for mouse-wheel-scroll-amount.
Since I want this in Emacs 26 I figured it’s better to go with an ugly
method that works for now, and figure out a neater solution later.
> Then it sets the user option to that value (using the option’s
> ‘:set’ property if that is defined).
^^^^
> I /think/ this is the right thing to do, but if any Customize experts
> can weigh in, that would be great.
Please do.
--
Alan Third
- Re: Smoother macOS touchpad scrolling, (continued)
- Re: Smoother macOS touchpad scrolling, Tak Kunihiro, 2017/09/12
- Re: Better macOS scrolling (was: Smoother macOS touchpad scrolling), Alan Third, 2017/09/13
- Re: Better macOS scrolling, Tak Kunihiro, 2017/09/13
- Re: Smoother macOS touchpad scrolling, Alan Third, 2017/09/16
- Re: Smoother macOS touchpad scrolling, Charles A. Roelli, 2017/09/18
- Re: Smoother macOS touchpad scrolling, Charles A. Roelli, 2017/09/18
- Re: Smoother macOS touchpad scrolling, Alan Third, 2017/09/18
- Re: Smoother macOS touchpad scrolling, Charles A. Roelli, 2017/09/18
- Re: Smoother macOS touchpad scrolling,
Alan Third <=