aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mouse.el32
1 files changed, 11 insertions, 21 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0384a6349df..eb67ef7ee35 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -579,9 +579,7 @@ If you do this twice in the same position, the selection is killed."
579 ;; We have already put the old region in the kill ring. 579 ;; We have already put the old region in the kill ring.
580 ;; Replace it with the extended region. 580 ;; Replace it with the extended region.
581 ;; (It would be annoying to make a separate entry.) 581 ;; (It would be annoying to make a separate entry.)
582 (setcar kill-ring (buffer-substring (point) (mark t))) 582 (kill-new (buffer-substring (point) (mark t)) t)
583 (if interprogram-cut-function
584 (funcall interprogram-cut-function (car kill-ring)))
585 ;; Arrange for a repeated mouse-3 to kill this region. 583 ;; Arrange for a repeated mouse-3 to kill this region.
586 (setq mouse-save-then-kill-posn 584 (setq mouse-save-then-kill-posn
587 (list (car kill-ring) (point) click-posn)) 585 (list (car kill-ring) (point) click-posn))
@@ -619,9 +617,7 @@ If you do this twice in the same position, the selection is killed."
619 (goto-char new) 617 (goto-char new)
620 (set-mark new)) 618 (set-mark new))
621 (setq deactivate-mark nil))) 619 (setq deactivate-mark nil)))
622 (setcar kill-ring (buffer-substring (point) (mark t))) 620 (kill-new (buffer-substring (point) (mark t)) t))
623 (if interprogram-cut-function
624 (funcall interprogram-cut-function (car kill-ring))))
625 ;; We just have point, so set mark here. 621 ;; We just have point, so set mark here.
626 (mouse-set-mark-fast click) 622 (mouse-set-mark-fast click)
627 (kill-ring-save (point) (mark t)) 623 (kill-ring-save (point) (mark t))
@@ -849,11 +845,9 @@ again. If you do this twice in the same position, it kills the selection."
849 ;; We have already put the old region in the kill ring. 845 ;; We have already put the old region in the kill ring.
850 ;; Replace it with the extended region. 846 ;; Replace it with the extended region.
851 ;; (It would be annoying to make a separate entry.) 847 ;; (It would be annoying to make a separate entry.)
852 (setcar kill-ring (buffer-substring 848 (kill-new (buffer-substring
853 (overlay-start mouse-secondary-overlay) 849 (overlay-start mouse-secondary-overlay)
854 (overlay-end mouse-secondary-overlay))) 850 (overlay-end mouse-secondary-overlay)) t)
855 (if interprogram-cut-function
856 (funcall interprogram-cut-function (car kill-ring)))
857 ;; Arrange for a repeated mouse-3 to kill this region. 851 ;; Arrange for a repeated mouse-3 to kill this region.
858 (setq mouse-save-then-kill-posn 852 (setq mouse-save-then-kill-posn
859 (list (car kill-ring) (point) click-posn))) 853 (list (car kill-ring) (point) click-posn)))
@@ -894,17 +888,13 @@ again. If you do this twice in the same position, it kills the selection."
894 click-posn)) 888 click-posn))
895 (setq deactivate-mark nil))) 889 (setq deactivate-mark nil)))
896 (if (eq last-command 'mouse-secondary-save-then-kill) 890 (if (eq last-command 'mouse-secondary-save-then-kill)
897 (progn 891 ;; If the front of the kill ring comes from
898 ;; If the front of the kill ring comes from 892 ;; an immediately previous use of this command,
899 ;; an immediately previous use of this command, 893 ;; replace it with the extended region.
900 ;; replace it with the extended region. 894 ;; (It would be annoying to make a separate entry.)
901 ;; (It would be annoying to make a separate entry.) 895 (kill-new (buffer-substring
902 (setcar kill-ring
903 (buffer-substring
904 (overlay-start mouse-secondary-overlay) 896 (overlay-start mouse-secondary-overlay)
905 (overlay-end mouse-secondary-overlay))) 897 (overlay-end mouse-secondary-overlay)) t)
906 (if interprogram-cut-function
907 (funcall interprogram-cut-function (car kill-ring))))
908 (copy-region-as-kill (overlay-start mouse-secondary-overlay) 898 (copy-region-as-kill (overlay-start mouse-secondary-overlay)
909 (overlay-end mouse-secondary-overlay)))) 899 (overlay-end mouse-secondary-overlay))))
910 (if mouse-secondary-start 900 (if mouse-secondary-start