[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mouse cut moves point
From: |
Bob Proulx |
Subject: |
Re: Mouse cut moves point |
Date: |
Thu, 3 Jan 2013 19:16:15 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Bob Proulx wrote:
> I think maybe if I create a new function and save-excursion and have
> it call mouse-set-region in order to update the kill-ring and then
> bind this new function to drag-mouse-1 instead then after a mouse drag
> cut to set the kill-ring I could have it return to the previous
> location of the point.
This does 90% of what I want.
(defun mouse-drag-region-no-move-point (start-event)
"Calls mouse-drag-region but without moving the point."
(interactive "e")
(save-excursion (mouse-drag-region start-event)))
(global-set-key [down-mouse-1] 'mouse-drag-region-no-move-point)
Yay! This is a significant improvement for me. Working with
double-click for words and tripple-click for lines would be nice but
more complicated.
Bob