diff options
| author | Eli Zaretskii | 2010-08-14 18:41:22 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2010-08-14 18:41:22 +0300 |
| commit | e7afcf30cdb852f69946cb55c2ec0c2f113436c5 (patch) | |
| tree | b8daee7db58f60072c2ba8225a972fe0994e9b51 | |
| parent | b236615c100961c3f4c555634ac56d51e723e43a (diff) | |
| download | emacs-e7afcf30cdb852f69946cb55c2ec0c2f113436c5.tar.gz emacs-e7afcf30cdb852f69946cb55c2ec0c2f113436c5.zip | |
Fix bug #6689 with mouse-2 pasting on Windows.
mouse.el (mouse-yank-primary): On MS-Windows and MS-DOS, call
x-get-selection-value in preference to x-get-selection.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/mouse.el | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d61c11b4ef5..dee217104db 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-08-14 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * mouse.el (mouse-yank-primary): Fix mouse-2 on MS-Windows and | ||
| 4 | MS-DOS. (Bug#6689) | ||
| 5 | |||
| 1 | 2010-08-13 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2010-08-13 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * menu-bar.el (menu-bar-set-tool-bar-position): New function. | 8 | * menu-bar.el (menu-bar-set-tool-bar-position): New function. |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 3bc3fcefa80..89a136434d9 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1265,10 +1265,17 @@ regardless of where you click." | |||
| 1265 | ;; the middle of an active region. | 1265 | ;; the middle of an active region. |
| 1266 | (deactivate-mark)) | 1266 | (deactivate-mark)) |
| 1267 | (or mouse-yank-at-point (mouse-set-point click)) | 1267 | (or mouse-yank-at-point (mouse-set-point click)) |
| 1268 | (let ((primary (x-get-selection 'PRIMARY))) | 1268 | (let ((primary |
| 1269 | (cond | ||
| 1270 | ((fboundp 'x-get-selection-value) ; MS-DOS and MS-Windows | ||
| 1271 | (or (x-get-selection-value) | ||
| 1272 | (x-get-selection 'PRIMARY))) | ||
| 1273 | ;; FIXME: What about xterm-mouse-mode etc.? | ||
| 1274 | (t | ||
| 1275 | (x-get-selection 'PRIMARY))))) | ||
| 1269 | (if primary | 1276 | (if primary |
| 1270 | (insert primary) | 1277 | (insert primary) |
| 1271 | (error "No primary selection")))) | 1278 | (error "No selection is available")))) |
| 1272 | 1279 | ||
| 1273 | (defun mouse-kill-ring-save (click) | 1280 | (defun mouse-kill-ring-save (click) |
| 1274 | "Copy the region between point and the mouse click in the kill ring. | 1281 | "Copy the region between point and the mouse click in the kill ring. |