Mercurial > emacs
comparison lisp/mouse.el @ 109965:aa6b00b4471c
Avoid clobbering primary selection when switching frames (Bug#6872).
* lisp/mouse.el (mouse-yank-primary): Avoid setting primary when
deactivating the mark (Bug#6872).
* src/keyboard.c (command_loop_1): Don't set primary selection during
handle-switch-frame (Bug#6872).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 24 Aug 2010 11:48:14 -0400 |
parents | bb6ea55bfdc0 |
children | 280c8ae2476d |
comparison
equal
deleted
inserted
replaced
109964:894f06878a7e | 109965:aa6b00b4471c |
---|---|
1266 If `mouse-yank-at-point' is non-nil, insert at point | 1266 If `mouse-yank-at-point' is non-nil, insert at point |
1267 regardless of where you click." | 1267 regardless of where you click." |
1268 (interactive "e") | 1268 (interactive "e") |
1269 ;; Give temporary modes such as isearch a chance to turn off. | 1269 ;; Give temporary modes such as isearch a chance to turn off. |
1270 (run-hooks 'mouse-leave-buffer-hook) | 1270 (run-hooks 'mouse-leave-buffer-hook) |
1271 ;; Without this, confusing things happen upon e.g. inserting into | |
1272 ;; the middle of an active region. | |
1271 (when select-active-regions | 1273 (when select-active-regions |
1272 ;; Without this, confusing things happen upon e.g. inserting into | 1274 (let (select-active-regions) |
1273 ;; the middle of an active region. | 1275 (deactivate-mark))) |
1274 (deactivate-mark)) | |
1275 (or mouse-yank-at-point (mouse-set-point click)) | 1276 (or mouse-yank-at-point (mouse-set-point click)) |
1276 (let ((primary | 1277 (let ((primary |
1277 (cond | 1278 (cond |
1278 ((fboundp 'x-get-selection-value) ; MS-DOS and MS-Windows | 1279 ((fboundp 'x-get-selection-value) ; MS-DOS and MS-Windows |
1279 (or (x-get-selection-value) | 1280 (or (x-get-selection-value) |