From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#35389: 27.0.50; [PATCH] Emacs on macOS sets mouse-wheel variables directly Date: Fri, 10 May 2019 17:29:46 +0200 Message-ID: References: <87y341q8cb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="39635"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35389@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 10 17:52:21 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hP7or-000AAa-IT for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2019 17:52:21 +0200 Original-Received: from localhost ([127.0.0.1]:45471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP7oq-0003J4-Hy for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2019 11:52:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP7TH-0000Y0-So for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 11:30:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP7TG-00006u-TV for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 11:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53500) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP7TG-00006d-QA for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 11:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hP7TG-00037h-K1 for bug-gnu-emacs@gnu.org; Fri, 10 May 2019 11:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 May 2019 15:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35389 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35389-submit@debbugs.gnu.org id=B35389.155750219811968 (code B ref 35389); Fri, 10 May 2019 15:30:02 +0000 Original-Received: (at 35389) by debbugs.gnu.org; 10 May 2019 15:29:58 +0000 Original-Received: from localhost ([127.0.0.1]:38811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hP7TB-00036x-OO for submit@debbugs.gnu.org; Fri, 10 May 2019 11:29:57 -0400 Original-Received: from mail-ed1-f68.google.com ([209.85.208.68]:39037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hP7T9-00036k-8a for 35389@debbugs.gnu.org; Fri, 10 May 2019 11:29:55 -0400 Original-Received: by mail-ed1-f68.google.com with SMTP id e24so5640480edq.6 for <35389@debbugs.gnu.org>; Fri, 10 May 2019 08:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=n3TJSVSuFfXptg+fdclToLlaAJBEZWcOgtzyKlvZoVU=; b=aHbjlq8js+0SflQFLubEv4NCDYVbzeZn5Q3Ini1F99wXbFGLDRaANchs0aDs517sTw NYJSgRMpWDwIJ1kBmHtVDNKx136bMgK6yLmI6iRFqx4aYUlrwORTFsIetd0Y1GFxOyG0 eaz6Ky6erIv4q3H9UaW4+1+MECILJYbywrxHvP5I4sSigEbT6ty/SjqozRSxCwNFTtJb 0ZFszzdoGNgv4VLTBPjsn4QcrjDG6kTjdToNVmlo+jf0RjKMY8fFo+43X8H+tARXcAVB 45KsKXHZ73U2UBB8oe+Y3lo+9vhHiMHzy92YOt3vigNFMxjR3qJ5vZneW9fK5rfGaa71 f3VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=n3TJSVSuFfXptg+fdclToLlaAJBEZWcOgtzyKlvZoVU=; b=IsKpjhYpq6ZBrHmFBoC9u9rytANZ1X95nkGyjt/Irz3B6HnM0af5iGyofTSKoH05U+ e+buTZ7kMZSCNHAexzttkYOlNFcjVS9j7+cUMJFtaUXRXABG9IlBcNYluxsnuDcNOKx1 rAFHD7Rptd6cbQ1VygIjIewx7d4IiBfkvzFK2m0zJRk/lS3uJuAouFsd/Ppcv3aI3qGs x2lJ4W6K36edC6AsYmHmD8/NIMu1Wy78yUb8XEdmwAj/CKYmPuNUw0VYOYX+BQvx2oKg Y/TsZ4vd05+CfTIE69oJwdItdRp/JugXWilO87dIR5pe7tz4+Eir0SxpfUlMxHOjXjqX uFWw== X-Gm-Message-State: APjAAAVq4/SJa/3jVVPAQOd40ObW4CBnhmMg+OpYHePd7/bs9alQjN/k GrQkqC2bhcAbWB8tD6tJzASuok8f X-Google-Smtp-Source: APXvYqy/bnw8lpe+vJSKJBx7brWgjz78/0ICX0XxM+g+VQ0AYblOdZdoFlexhIulh+IAluiME3Po4w== X-Received: by 2002:a50:95af:: with SMTP id w44mr11720641eda.95.1557502189069; Fri, 10 May 2019 08:29:49 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id l5sm1516102edb.50.2019.05.10.08.29.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 10 May 2019 08:29:47 -0700 (PDT) In-Reply-To: (Robert Pluim's message of "Tue, 23 Apr 2019 13:38:59 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159051 Archived-At: >>>>> On Tue, 23 Apr 2019 13:38:59 +0200, Robert Pluim s= aid: >>>>> On Tue, 23 Apr 2019 07:17:24 -0400, Noam Postavsky said: Noam> I think it should work to change customized-value to Noam> standard-value. Robert> That works, thanks. I=CA=BCll 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) =20 -(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") =20 -(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 scrolli= ng. 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") =20 (defcustom mouse-wheel-follow-mouse t "Whether the mouse wheel should scroll the window that the mouse is over.