summaryrefslogtreecommitdiff
path: root/lisp/textmodes/flyspell.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2020-08-18 12:43:16 +0200
committerStefan Kangas <stefankangas@gmail.com>2020-08-18 12:49:36 +0200
commitae098c3e726da4d926f824f7caf28456f2a7c003 (patch)
treecefb6e2ff6625ea7921c3512d7247e6d07e62b47 /lisp/textmodes/flyspell.el
parente0c19e8dced9cc0149dc64a7494988bbfe765846 (diff)
downloademacs-ae098c3e726da4d926f824f7caf28456f2a7c003.tar.gz
Rename new option to flyspell-use-mouse-3-for-menu
* lisp/textmodes/flyspell.el (flyspell-use-mouse-3-for-menu): Rename from 'flyspell-correct-on-mouse-3'. The previous name did not make it clear that it's about opening a menu. (Bug#11680) (flyspell--set-use-mouse-3-for-menu): Rename from 'flyspell--set-correct-on-mouse-3'. Bind menu to 'down-mouse-3' instead of 'mouse-3' to be more in line with user expectations. (flyspell-mode): Use the above new names. * doc/emacs/fixit.texi (Spelling): * etc/NEWS: Update documentation to use the new name. Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
Diffstat (limited to 'lisp/textmodes/flyspell.el')
-rw-r--r--lisp/textmodes/flyspell.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 8608f850888..23f96d7e0ee 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -446,19 +446,19 @@ like <img alt=\"Some thing.\">."
"Minor mode keymap for Flyspell mode--for the whole buffer.")
;; correct on mouse 3
-(defun flyspell--set-correct-on-mouse-3 (var value)
+(defun flyspell--set-use-mouse-3-for-menu (var value)
(set-default var value)
(if value
(progn (define-key flyspell-mouse-map [mouse-2] nil)
- (define-key flyspell-mouse-map [mouse-3] 'flyspell-correct-word))
+ (define-key flyspell-mouse-map [down-mouse-3] 'flyspell-correct-word))
(define-key flyspell-mouse-map [mouse-2] 'flyspell-correct-word)
- (define-key flyspell-mouse-map [mouse-3] nil)))
+ (define-key flyspell-mouse-map [down-mouse-3] nil)))
-(defcustom flyspell-correct-on-mouse-3 nil
+(defcustom flyspell-use-mouse-3-for-menu nil
"Non-nil means to bind `mouse-3' to `flyspell-correct-word'.
If this is set, also unbind `mouse-2'."
:type 'boolean
- :set 'flyspell--set-correct-on-mouse-3
+ :set 'flyspell--set-use-mouse-3-for-menu
:version "28.1")
;; dash character machinery
@@ -531,8 +531,8 @@ in your init file.
(if flyspell-mode
(condition-case err
(progn
- (when flyspell-correct-on-mouse-3
- (flyspell--set-correct-on-mouse-3 'flyspell-correct-on-mouse-3 t))
+ (when flyspell-use-mouse-3-for-menu
+ (flyspell--set-use-mouse-3-for-menu 'flyspell-use-mouse-3-for-menu t))
(flyspell-mode-on))
(error (message "Error enabling Flyspell mode:\n%s" (cdr err))
(flyspell-mode -1)))