From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#11680: flyspell should use mouse-3 instead of mouse-2 Date: Thu, 16 Jan 2020 02:50:19 +0100 Message-ID: <87d0bkyxt0.fsf@marxist.se> References: <87imo3ihjk.fsf@skangas.se> <83ftj7l8jj.fsf@gnu.org> <83k18ik971.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="78735"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 11680@debbugs.gnu.org, l26wang@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 16 02:51:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iruJW-000KQj-2W for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Jan 2020 02:51:14 +0100 Original-Received: from localhost ([::1]:35140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iruJU-0007HQ-Or for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Jan 2020 20:51:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40305) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iruJM-0007HI-KG for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 20:51:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iruJK-0004YF-Mv for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 20:51:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iruJK-0004Y4-EP for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 20:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iruJK-0002Y5-DN for bug-gnu-emacs@gnu.org; Wed, 15 Jan 2020 20:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jan 2020 01:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11680 X-GNU-PR-Package: emacs Original-Received: via spool by 11680-submit@debbugs.gnu.org id=B11680.15791394289755 (code B ref 11680); Thu, 16 Jan 2020 01:51:02 +0000 Original-Received: (at 11680) by debbugs.gnu.org; 16 Jan 2020 01:50:28 +0000 Original-Received: from localhost ([127.0.0.1]:36545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iruIl-0002XH-PD for submit@debbugs.gnu.org; Wed, 15 Jan 2020 20:50:28 -0500 Original-Received: from ted.gofardesign.uk ([67.225.143.91]:40190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iruIk-0002X2-Nq for 11680@debbugs.gnu.org; Wed, 15 Jan 2020 20:50:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qDMwxmQvYh8C6BcOM04ePQfBcbR8TAZegnC8VAzfSFM=; b=A+//jHguofvYjdp28EJgTbBiyh E6fC76P4OeZnARpmDo+nn0OvJ+xNBLlIoeDpmuFWQhTwpb+B7gUeNy9A0dURLYrBRs+lgRbxF4E0X KB2fIK1wQqw/6Pa5bDbOfw74r28ltcjTHHlUtciS6adgDMUkmA38AlKywwfVJ1MrGvwZn7I/0NF0L uH/JD8rEstlMZ50AAqSZoPzF3AZzVBiHyP+FlD5OQrvTE5SVgWR8Lo0HWvnkzdKBgIYQlZR1YGgmz Anmwbul3dMS6XKTInHq13cFu5Yy5aKiPS3GqV9EGDZSvWTuofD4YXcSA1I8F7SG+REU/fjyprnsOu hidtv0Iw==; Original-Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:53366 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iruIe-001DRh-Va; Wed, 15 Jan 2020 20:50:21 -0500 In-Reply-To: <83k18ik971.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Nov 2019 09:51:14 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:174689 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> Eli Zaretskii writes: >> > This would be a backward-incompatible change, so we cannot just change >> > it because someone asked for that. I, for example, use that menu on >> > mouse-2 all the time. >> >> OK. How about adding the mouse-3 key binding without removing the mouse-2 one? > > Fine with me, but that button is already bound to > mouse-save-then-kill. I never use it, but what will those who do say? Since this key binding is only in flyspell-mouse-map, it will only be rebound when the mouse pointer is over a misspelled word. Note that mouse-2 is normally bound to mouse-yank-primary. I therefore don't think it will be a big problem in practice. On the contrary, I believe that having the context menu on the right mouse button will feel more natural and be more discoverable to users. I have attached an updated patch below. If there are no objections to it, would this change be safe for the release branch, or should it go to master? Best regards, Stefan Kangas --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Bind-flyspell-correct-word-to-mouse-3-also.patch >From 74751c091cfb78e0565cec6bd7bf31acc0b421f4 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 31 Oct 2019 02:15:56 +0100 Subject: [PATCH] Bind flyspell-correct-word to mouse-3 also * lisp/textmodes/flyspell.el (flyspell-mouse-map): Bind 'flyspell-correct-word' to 'mouse-3' in addition to 'mouse-2'. (Bug#11680) * doc/emacs/fixit.texi (Spelling): Document the new key binding. * etc/NEWS: Announce it. --- doc/emacs/fixit.texi | 13 +++++++------ etc/NEWS | 9 +++++++++ lisp/textmodes/flyspell.el | 1 + 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index 171a9bc06f..d246dedd70 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi @@ -441,12 +441,13 @@ Spelling @findex flyspell-auto-correct-word @findex flyspell-correct-word-before-point When Flyspell mode highlights a word as misspelled, you can click on -it with @kbd{mouse-2} (@code{flyspell-correct-word}) to display a menu -of possible corrections and actions. In addition, @kbd{C-.} or -@kbd{@key{ESC}-@key{TAB}} (@code{flyspell-auto-correct-word}) will -propose various successive corrections for the word at point, and -@kbd{C-c $} (@code{flyspell-correct-word-before-point}) will pop up a -menu of possible corrections. Of course, you can always correct the +it with @kbd{mouse-2} or @kbd{mouse-3} (@code{flyspell-correct-word}) +to display a menu of possible corrections and actions. In addition, +@kbd{C-.} or @kbd{@key{ESC}-@key{TAB}} +(@code{flyspell-auto-correct-word}) will propose various successive +corrections for the word at point, and @kbd{C-c $} +(@code{flyspell-correct-word-before-point}) will pop up a menu of +possible corrections. Of course, you can always correct the misspelled word by editing it manually in any way you like. @findex flyspell-prog-mode diff --git a/etc/NEWS b/etc/NEWS index 0e43c321d8..4feebd3aa9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -44,6 +44,15 @@ It was declared obsolete in Emacs 27.1. * Changes in Specialized Modes and Packages in Emacs 28.1 +** Flyspell mode + ++++ +*** Corrections and actions menu is now also bound to mouse-3. +When Flyspell mode highlights a word as misspelled, you can click on +it to display a menu of possible corrections and actions. In addition +to being bound to mouse-2 (usually the middle mouse button), it is now +also bound to mouse-3 (usually the right mouse button). + * New Modes and Packages in Emacs 28.1 diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 39a1b488a7..b04c4d6f3b 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -461,6 +461,7 @@ flyspell-prog-mode (defvar flyspell-mouse-map (let ((map (make-sparse-keymap))) (define-key map [mouse-2] 'flyspell-correct-word) + (define-key map [mouse-3] 'flyspell-correct-word) map) "Keymap for Flyspell to put on erroneous words.") -- 2.20.1 --=-=-=--