質問

In Aquamacs 2.2 I could do the following:

1) Set the mark with C-SPACE

2) Click somewhere to set the point

Consequently this would define the region. Since Aquamacs-2.3 this behaviour is gone: A click sets both the mark and the point. Is there a way to customize aquamacs to have the old behaviour?

役に立ちましたか?

解決

For Emacs 24, here's what worked for me (and may also apply to Aquamacs): Unset the binding for the <down-mouse-1> event, which is what is setting the mark (but not the point; the point is set by a different binding, for the up-event <mouse-1>).

That seems to provide the behavior you are asking for: clicking the mouse after setting the mark via C-space sets the point, and one can see the corresponding region highlighted.


I determined this by reading the help for the bindings above, by doing: M-x helpkclick, and reading the *Help* text, which explains that <down-mouse-1> is bound to command mouse-drag-region (which sets the mark).

I then tested the resulting behavior by interactively disabling the binding, by doing: M-x global-unset-key and then clicking; but it is probably much safer to do it programmatically, e.g. in the scratch buffer, by evaluating:

(global-unset-key [down-mouse-1])

If you like the behavior that results, then just copy the above line into your .emacs


Employing the solution described above does seem to cause mouse-dragging to be a little funky, in that it does not highlight the selected region during the drag (but you still get to see what the region is once you let go, and you can now fine tune its end point via single clicks, which may be useful in some circumstances.)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top