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