2

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?

Thomas
  • 2,093
  • 3
  • 23
  • 28
  • This sounds like a nice feature, very much in the spirit of Emacs point-mark paradigm. Unfortunately I cannot fathom how the old Aquamacs achieved it, the code in Emacs 24 seems pretty deeply hardcoded to set both point and mark (see `mouse--drag-set-mark-and-point` in `mouse.el`), and changing it would break regular drag-selection. Maybe you could post a feature request to `gnu-emacs-bug@gnu.org`? – user4815162342 Dec 12 '12 at 05:18
  • It may be related to changes in CUA-mode, I'll have to do some more investigations, but I may post this feature request. – Thomas Dec 13 '12 at 18:24

1 Answers1

4

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.)

pnkfelix
  • 3,770
  • 29
  • 45