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

From: Noam Postavsky <[email-masked]>
Date: Tue, 23 Apr 2019 07:17:24 -0400

Robert Pluim <[email-masked]> writes:

> I use the cus-edit+ package, which prompts you to save unsaved
> customizations when you exit emacs. This triggers for me all the time,
> because lisp/term/ns-win.el does 'setq' on mouse-wheel-scroll-amount
> and mouse-wheel-progressive-speed, which I think is a no-no. The patch
> below fixes it for me, but Iʼm utterly ignorant of customize, so
> perhaps itʼs not the correct fix.

I think it should work to change customized-value to standard-value.

--- i/lisp/term/ns-win.el
+++ w/lisp/term/ns-win.el
@@ -746,11 +746,11 @@ (when (featurep 'cocoa)
     ;; Appkit 1138 ~= macOS 10.7.
     (when (>= appkit-version 1138)
       (setq mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control))))
-      (put 'mouse-wheel-scroll-amount 'customized-value
+      (put 'mouse-wheel-scroll-amount 'standard-value
            (list (custom-quote (symbol-value 'mouse-wheel-scroll-amount))))
 
       (setq mouse-wheel-progressive-speed nil)
-      (put 'mouse-wheel-progressive-speed 'customized-value
+      (put 'mouse-wheel-progressive-speed 'standard-value
            (list (custom-quote
                   (symbol-value 'mouse-wheel-progressive-speed)))))))