summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index c9b190f1c79..a2a0191ce79 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1268,10 +1268,11 @@ regardless of where you click."
(interactive "e")
;; Give temporary modes such as isearch a chance to turn off.
(run-hooks 'mouse-leave-buffer-hook)
+ ;; Without this, confusing things happen upon e.g. inserting into
+ ;; the middle of an active region.
(when select-active-regions
- ;; Without this, confusing things happen upon e.g. inserting into
- ;; the middle of an active region.
- (deactivate-mark))
+ (let (select-active-regions)
+ (deactivate-mark)))
(or mouse-yank-at-point (mouse-set-point click))
(let ((primary
(cond