emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 18 Sep 2017 20:03:37 +0100
User-agent: Mutt/1.9.0 (2017-09-02)

On Mon, Sep 18, 2017 at 08:10:59PM +0200, Charles A. Roelli wrote:
> With macOS 10.6, I haven't found Emacs scrolling with the touchpad to
> be too unusual, maybe just a bit clunky.  Wouldn't the following code
> also affect 10.6?

You’re right.

Can you confirm that this doesn’t return true on 10.6?

(let ((appkit-version (progn (string-match "^appkit-\\([^\s-]*\\)"
                              ns-version-string)
                             (match-string 1 ns-version-string))))
  (>= (string-to-number appkit-version) 1138))

> > +(when (featurep 'cocoa)
> > +  (setq mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control))))
> > +  (setq mouse-wheel-progressive-speed nil))
> 
> Also, won't these variable changes make Customize report that their
> values were "changed outside Customize"?

I have absolutely no idea...

Customize is something I’ve largely done my best to avoid, so I don’t
know how I should go about setting them in a way that’s friendly to
it.

Something like this?

(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))))))

It looks pretty messy.
-- 
Alan Third



reply via email to

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