Transient mark mode seems to have changed in behavior between 21.X and
22.x. I had formerly used it, along with mouse-drag-region, to
temporarily highlight regions of text to operate on. Binding this to
a down-mouse event, I could mouse-down drag mouse-up and the function
would complete. Now, mouse-up doesn't seem to do anything, and you
get the "DRAG FINISHED" message only after another event is entered.
Try this in 21.X and 22.X:
(defun do-drag (event)
"Print value of variable at the mouse position, with `help'"
(interactive "e")
(let ((transient-mark-mode t))
(message "DRAG STARTED")
(mouse-drag-region event)
(message "DRAG FINISHED")))
(global-set-key [(control shift down-mouse-2)] 'do-drag)
I noticed that setting the transient-mark-mode variable no longer does
anything, so I attempted:
(defun do-drag (event)
"Print value of variable at the mouse position, with `help'"
(interactive "e")
(transient-mark-mode 1)
(message "DRAG STARTED")
(mouse-drag-region event)
(message "DRAG FINISHED")
(transient-mark-mode -1))
But that also doesn't finish on mouse-up (and is less than ideal,
since it doesn't restore the existing transient-mark-mode status).
Any suggested workarounds?
Thanks,
JD
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel