diff options
| author | Chong Yidong | 2009-07-17 23:24:54 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-07-17 23:24:54 +0000 |
| commit | 6c6a75d5824928e4aa66de9f89d74cb38102e4dc (patch) | |
| tree | b3a473a9e2c3c508e493986bebf66a030c46ec65 | |
| parent | 0855c2caf383ba9412e2f3db0ac374a94a055222 (diff) | |
| download | emacs-6c6a75d5824928e4aa66de9f89d74cb38102e4dc.tar.gz emacs-6c6a75d5824928e4aa66de9f89d74cb38102e4dc.zip | |
* mouse.el (mouse-yank-primary): If select-active-regions is non-nil,
deactivate the mark before insertion.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/mouse.el | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df01e56c679..5b899c35ca0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -9,8 +9,9 @@ | |||
| 9 | * w32-fns.el (x-selection-owner-p): New function. | 9 | * w32-fns.el (x-selection-owner-p): New function. |
| 10 | 10 | ||
| 11 | * mouse.el (mouse-drag-track): Call deactivate-mark earlier. | 11 | * mouse.el (mouse-drag-track): Call deactivate-mark earlier. |
| 12 | (mouse-yank-at-click): If select-active-regions is non-nil, | 12 | (mouse-yank-at-click, mouse-yank-primary): If |
| 13 | deactivate the mark before insertion. | 13 | select-active-regions is non-nil, deactivate the mark before |
| 14 | insertion. | ||
| 14 | 15 | ||
| 15 | * simple.el (deactivate-mark, set-mark): Only save selection if we | 16 | * simple.el (deactivate-mark, set-mark): Only save selection if we |
| 16 | own it. | 17 | own it. |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 7b7f6927deb..9e25078e72a 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1387,6 +1387,10 @@ regardless of where you click." | |||
| 1387 | (interactive "e") | 1387 | (interactive "e") |
| 1388 | ;; Give temporary modes such as isearch a chance to turn off. | 1388 | ;; Give temporary modes such as isearch a chance to turn off. |
| 1389 | (run-hooks 'mouse-leave-buffer-hook) | 1389 | (run-hooks 'mouse-leave-buffer-hook) |
| 1390 | (when select-active-regions | ||
| 1391 | ;; Without this, confusing things happen upon e.g. inserting into | ||
| 1392 | ;; the middle of an active region. | ||
| 1393 | (deactivate-mark t)) | ||
| 1390 | (or mouse-yank-at-point (mouse-set-point click)) | 1394 | (or mouse-yank-at-point (mouse-set-point click)) |
| 1391 | (let ((primary (x-get-selection 'PRIMARY))) | 1395 | (let ((primary (x-get-selection 'PRIMARY))) |
| 1392 | (if primary | 1396 | (if primary |