Next: , Previous: , Up: Customisation  


3.7: The Mouse and Highlighting

Q3.7.1: How can I turn off Mouse pasting?

I keep hitting the middle mouse button by accident and getting stuff pasted into my buffer so how can I turn this off?

Here is an alternative binding, whereby the middle mouse button selects (but does not cut) the expression under the mouse. Clicking middle on a left or right paren will select to the matching one. Note that you can use define-key or global-set-key.

(defun mouse-set-point-and-select (event)
  "Sets the point at the mouse location, then marks following form"
  (interactive "@e")
  (mouse-set-point event)
  (mark-sexp 1))
(define-key global-map [button2] 'mouse-set-point-and-select)