Mercurial > emacs
changeset 21194:7a7950ffa79b
(mouse-drag-region): Bind deactivate-mark
around call to copy-region-as-kill.
(mouse-set-region): Likewise.
(mouse-secondary-save-then-kill): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 16 Mar 1998 08:05:58 +0000 |
parents | 20bba919ec72 |
children | 169fde4a67c1 |
files | lisp/mouse.el |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mouse.el Mon Mar 16 08:01:15 1998 +0000 +++ b/lisp/mouse.el Mon Mar 16 08:05:58 1998 +0000 @@ -431,7 +431,7 @@ ;; Don't set this-command to kill-region, so that a following ;; C-w will not double the text in the kill ring. ;; Ignore last-command so we don't append to a preceding kill. - (let (this-command last-command) + (let (this-command last-command deactivate-mark) (copy-region-as-kill (mark) (point))) (mouse-set-region-1))) @@ -608,7 +608,9 @@ last-command this-command) (push-mark region-commencement t t) (goto-char region-termination) - (copy-region-as-kill (point) (mark t)) + ;; Don't let copy-region-as-kill set deactivate-mark. + (let (deactivate-mark) + (copy-region-as-kill (point) (mark t))) (let ((buffer (current-buffer))) (mouse-show-mark) ;; mouse-show-mark can call read-event, @@ -1279,8 +1281,9 @@ (kill-new (buffer-substring (overlay-start mouse-secondary-overlay) (overlay-end mouse-secondary-overlay)) t) - (copy-region-as-kill (overlay-start mouse-secondary-overlay) - (overlay-end mouse-secondary-overlay)))) + (let (deactivate-mark) + (copy-region-as-kill (overlay-start mouse-secondary-overlay) + (overlay-end mouse-secondary-overlay))))) (if mouse-secondary-start ;; All we have is one end of a selection, ;; so put the other end here.