all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Le Wang <l26wang@gmail.com>
Cc: 11680@debbugs.gnu.org
Subject: bug#11680: flyspell should use mouse-3 instead of mouse-2
Date: Fri, 01 Nov 2019 19:21:35 +0100	[thread overview]
Message-ID: <87imo3ihjk.fsf@skangas.se> (raw)
In-Reply-To: <CAM=K+irM7g+uiAC-78YA0Mjvgdk+=ES3Ejot_9sQqHe4HgW1qg@mail.gmail.com> (Le Wang's message of "Tue, 12 Jun 2012 20:23:54 +0800")

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

Le Wang <l26wang@gmail.com> writes:

> This makes sense because it's a context menu which is mouse-3 in
> modern UIs.
>
> See Stefan's answer here:
> http://stackoverflow.com/questions/10973000/emacs-23-4-mouse-2-behaviour-on-os-x-10-7

So Stefan writes at the link: "Rather flyspell needs to be fixed to
pop up its menu on mouse-3 since it's really more like a context
menu. I.e. I recommend a M-x report-emacs-bug about it."

I agree with this.  Any objections to the attached patch?

Best regards,
Stefan Kangas


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Move-flyspell-correct-word-to-mouse-3.patch --]
[-- Type: text/x-diff, Size: 2508 bytes --]

From f9b06855b129f4472908893d411d70b20fd0edfe Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Thu, 31 Oct 2019 02:15:56 +0100
Subject: [PATCH] Move flyspell-correct-word to mouse-3

* lisp/textmodes/flyspell.el (flyspell-mouse-map): Bind
'flyspell-correct-word' to 'mouse-3' instead of 'mouse-2'.
(Bug#11680)

* doc/emacs/fixit.texi (Spelling): Document it.
* etc/NEWS: Announce it.
---
 doc/emacs/fixit.texi       | 2 +-
 etc/NEWS                   | 9 +++++++++
 lisp/textmodes/flyspell.el | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index fc610583c8..90110e5b41 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -441,7 +441,7 @@ 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
+it with @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
diff --git a/etc/NEWS b/etc/NEWS
index cd1e46bb87..21c118e6ae 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2197,6 +2197,15 @@ file-local variable, you may need to update the value.
 *** Declare 'define-overload' and 'define-child-mode' as obsolete
 *** Rename several internal functions to use a ''mode-local-' prefix
 
++++
+** Flyspell mode
+
+*** Corrections and actions menu is now 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.  This was
+previously bound to mouse-2 (usually the middle mouse button), but has
+now been moved to mouse-3 (usually the right mouse button).
+
 \f
 * New Modes and Packages in Emacs 27.1
 
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index ce788207cf..36da29b6ac 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -460,7 +460,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


  reply	other threads:[~2019-11-01 18:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 12:23 bug#11680: flyspell should use mouse-3 instead of mouse-2 Le Wang
2019-11-01 18:21 ` Stefan Kangas [this message]
2019-11-01 19:07   ` Eli Zaretskii
2019-11-02  0:25     ` Stefan Kangas
2019-11-02  7:51       ` Eli Zaretskii
2020-01-16  1:50         ` Stefan Kangas
2020-01-16 14:46           ` Eli Zaretskii
2020-08-13  6:10             ` Stefan Kangas
2020-08-13 13:07               ` Eli Zaretskii
2020-08-15  1:08                 ` Stefan Kangas
2020-08-15 17:53                   ` Eli Zaretskii
2020-08-16 17:53                     ` Stefan Kangas
2020-08-17  0:38                   ` Juri Linkov
2020-08-17  2:38                     ` Drew Adams
2020-08-17 14:01                       ` Stefan Kangas
2020-08-17 15:12                         ` Drew Adams
2020-08-19  1:07                   ` Juri Linkov
2020-08-19 10:00                     ` Stefan Kangas
2020-08-27  5:14                       ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imo3ihjk.fsf@skangas.se \
    --to=stefan@marxist.se \
    --cc=11680@debbugs.gnu.org \
    --cc=l26wang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.