how to map mouse-2 (middle button click) to (cmd + click) or (ctrl+click) on OS X using trackpad so as to display a popup menu under flyspell-mode.
emacs 23.4 mouse-2 behaviour on OS-X 10.7
A low acceptance demonstrates unwillingness to contribute the community. –
Mullein
How about mouse-3 like Stefan suggests?
Add this to your init file:
(eval-after-load "flyspell"
'(progn
(define-key flyspell-mouse-map [down-mouse-3] #'flyspell-correct-word)
(define-key flyspell-mouse-map [mouse-3] #'undefined)))
This works for me. But obviously you need to run this lisp snippet at start-up; - after
flyspell
is loaded, it is too late. –
Subrogation This is great! I've been modifying flyspell.el.gz each time and everytime I updated I'd lose it. –
Canarese
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.
There's already an option built in for this. Take a look at:
mac-emulate-three-button-mouse
Specifically, you should be able to just add:
(setq mac-emulate-three-button-mouse t)
In your .emacs, and then mouse-2 will be Option+Click and mouse-3 will be Cmd+Click
Note that this isn't present in GNU Emacs. –
Thousand
@SeanAllred To expand on that, this is for Aquamacs. –
Foreground
© 2022 - 2024 — McMap. All rights reserved.