emacs 23.4 mouse-2 behaviour on OS-X 10.7
Asked Answered
C

3

11

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.

Chino answered 10/6, 2012 at 22:55 Comment(1)
A low acceptance demonstrates unwillingness to contribute the community.Mullein
M
16

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)))
Mullein answered 12/6, 2012 at 13:35 Comment(2)
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
A
3

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.

Amphitheater answered 11/6, 2012 at 14:18 Comment(0)
M
1

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

Miniaturize answered 12/6, 2012 at 21:4 Comment(2)
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.