aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-03-16 08:05:58 +0000
committerRichard M. Stallman1998-03-16 08:05:58 +0000
commit1fa01bcdd7cd0ec299f497b79b29adb317b44deb (patch)
tree4249e4c51178fb52aa14af31c188773400c5077a
parent5c7319b6cecffa5b099a2c265c50b5d87f26d795 (diff)
downloademacs-1fa01bcdd7cd0ec299f497b79b29adb317b44deb.tar.gz
emacs-1fa01bcdd7cd0ec299f497b79b29adb317b44deb.zip
(mouse-drag-region): Bind deactivate-mark
around call to copy-region-as-kill. (mouse-set-region): Likewise. (mouse-secondary-save-then-kill): Likewise.
-rw-r--r--lisp/mouse.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 2241578cffc..e1b7e51e6a1 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -431,7 +431,7 @@ This should be bound to a mouse drag event."
431 ;; Don't set this-command to kill-region, so that a following 431 ;; Don't set this-command to kill-region, so that a following
432 ;; C-w will not double the text in the kill ring. 432 ;; C-w will not double the text in the kill ring.
433 ;; Ignore last-command so we don't append to a preceding kill. 433 ;; Ignore last-command so we don't append to a preceding kill.
434 (let (this-command last-command) 434 (let (this-command last-command deactivate-mark)
435 (copy-region-as-kill (mark) (point))) 435 (copy-region-as-kill (mark) (point)))
436 (mouse-set-region-1))) 436 (mouse-set-region-1)))
437 437
@@ -608,7 +608,9 @@ remains active. Otherwise, it remains until the next input event."
608 last-command this-command) 608 last-command this-command)
609 (push-mark region-commencement t t) 609 (push-mark region-commencement t t)
610 (goto-char region-termination) 610 (goto-char region-termination)
611 (copy-region-as-kill (point) (mark t)) 611 ;; Don't let copy-region-as-kill set deactivate-mark.
612 (let (deactivate-mark)
613 (copy-region-as-kill (point) (mark t)))
612 (let ((buffer (current-buffer))) 614 (let ((buffer (current-buffer)))
613 (mouse-show-mark) 615 (mouse-show-mark)
614 ;; mouse-show-mark can call read-event, 616 ;; mouse-show-mark can call read-event,
@@ -1279,8 +1281,9 @@ again. If you do this twice in the same position, it kills the selection."
1279 (kill-new (buffer-substring 1281 (kill-new (buffer-substring
1280 (overlay-start mouse-secondary-overlay) 1282 (overlay-start mouse-secondary-overlay)
1281 (overlay-end mouse-secondary-overlay)) t) 1283 (overlay-end mouse-secondary-overlay)) t)
1282 (copy-region-as-kill (overlay-start mouse-secondary-overlay) 1284 (let (deactivate-mark)
1283 (overlay-end mouse-secondary-overlay)))) 1285 (copy-region-as-kill (overlay-start mouse-secondary-overlay)
1286 (overlay-end mouse-secondary-overlay)))))
1284 (if mouse-secondary-start 1287 (if mouse-secondary-start
1285 ;; All we have is one end of a selection, 1288 ;; All we have is one end of a selection,
1286 ;; so put the other end here. 1289 ;; so put the other end here.