diff options
author | Eli Zaretskii <eliz@gnu.org> | 2010-08-14 18:41:22 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2010-08-14 18:41:22 +0300 |
commit | e7afcf30cdb852f69946cb55c2ec0c2f113436c5 (patch) | |
tree | b8daee7db58f60072c2ba8225a972fe0994e9b51 /lisp/mouse.el | |
parent | b236615c100961c3f4c555634ac56d51e723e43a (diff) | |
download | emacs-e7afcf30cdb852f69946cb55c2ec0c2f113436c5.tar.gz |
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.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r-- | lisp/mouse.el | 11 |
1 files changed, 9 insertions, 2 deletions
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." ;; the middle of an active region. (deactivate-mark)) (or mouse-yank-at-point (mouse-set-point click)) - (let ((primary (x-get-selection 'PRIMARY))) + (let ((primary + (cond + ((fboundp 'x-get-selection-value) ; MS-DOS and MS-Windows + (or (x-get-selection-value) + (x-get-selection 'PRIMARY))) + ;; FIXME: What about xterm-mouse-mode etc.? + (t + (x-get-selection 'PRIMARY))))) (if primary (insert primary) - (error "No primary selection")))) + (error "No selection is available")))) (defun mouse-kill-ring-save (click) "Copy the region between point and the mouse click in the kill ring. |