GNU bug report logs -
#11680
flyspell should use mouse-3 instead of mouse-2
Previous Next
Reported by: Le Wang <l26wang <at> gmail.com>
Date: Tue, 12 Jun 2012 12:28:01 UTC
Severity: minor
Fixed in version 28.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Le Wang <l26wang <at> 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
[0001-Move-flyspell-correct-word-to-mouse-3.patch (text/x-diff, inline)]
From f9b06855b129f4472908893d411d70b20fd0edfe Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas <at> 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).
+
* 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
This bug report was last modified 4 years and 347 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.