* mouse.el (mouse-yank-primary): If select-active-regions is non-nil,
deactivate the mark before insertion.
This commit is contained in:
parent
0855c2caf3
commit
6c6a75d582
2 changed files with 7 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -1387,6 +1387,10 @@ regardless of where you click."
|
|||
(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
|
||||
|
|
Loading…
Add table
Reference in a new issue