[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Need an enabler for a bad habit.

From: Drew Adams
Subject: RE: Need an enabler for a bad habit.
Date: Fri, 3 Nov 2006 09:59:02 -0800


I've added something similar to what Martin suggested previously to library
mouse+.el: The doc is

Because Emacs 22 shows buffer *Messages* when you click mouse-1 in the echo
area (which can useful or annoying!), and mouse-2 does nothing in the echo
area except show this message: "Minibuffer window is not active", I bind the
mouse M-x command to `down-mouse-2', not to `down-mouse-1'.

The command, `mouse-flash-position-or-M-x', keeps the original buffer and
window current while `M-x' is executed, and it uses whatever command you
have bound to `M-x' (in my case, `icicle-execute-extended-command').

`mouse-flash-position-or-M-x' is a general replacement for
`mouse-yank-at-click'. More precisely, you bind it to `down-mouse-2',
leaving `mouse-yank-at-click' bound to `mouse-2'.

`mouse-flash-position-or-M-x' has another feature, which is unrelated to the
echo-area use described above: It temporarily highlights the exact mouse
position, so you can correct your aim or cancel clicking (e.g. yanking) if
you haven't aimed well. This highlighting occurs regardless of which command
is bound to `mouse-2' (the up stroke), so, for instance, it works in Dired
also (where `mouse-2' is bound to `dired-mouse-find-file-other-window'). Its
main utility, however, is for yanking.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]