Mercurial > emacs
changeset 103949:d7999ea3bbc2
* mouse.el (mouse-yank-primary): If select-active-regions is non-nil,
deactivate the mark before insertion.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 17 Jul 2009 23:24:54 +0000 |
parents | 53e13148fb68 |
children | 6d93a06037ee |
files | lisp/ChangeLog lisp/mouse.el |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Jul 17 19:43:49 2009 +0000 +++ b/lisp/ChangeLog Fri Jul 17 23:24:54 2009 +0000 @@ -9,8 +9,9 @@ * w32-fns.el (x-selection-owner-p): New function. * mouse.el (mouse-drag-track): Call deactivate-mark earlier. - (mouse-yank-at-click): If select-active-regions is non-nil, - deactivate the mark before insertion. + (mouse-yank-at-click, mouse-yank-primary): If + select-active-regions is non-nil, deactivate the mark before + insertion. * simple.el (deactivate-mark, set-mark): Only save selection if we own it.
--- a/lisp/mouse.el Fri Jul 17 19:43:49 2009 +0000 +++ b/lisp/mouse.el Fri Jul 17 23:24:54 2009 +0000 @@ -1387,6 +1387,10 @@ (interactive "e") ;; Give temporary modes such as isearch a chance to turn off. (run-hooks 'mouse-leave-buffer-hook) + (when select-active-regions + ;; Without this, confusing things happen upon e.g. inserting into + ;; the middle of an active region. + (deactivate-mark t)) (or mouse-yank-at-point (mouse-set-point click)) (let ((primary (x-get-selection 'PRIMARY))) (if primary