diff options
author | Eli Zaretskii <eliz@gnu.org> | 2013-09-26 10:37:16 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-09-26 10:37:16 +0300 |
commit | b87c4ff2817e71ca71b028792200b1e069a95e04 (patch) | |
tree | bfe00c0655fa02078a9ab2c633ea06d90c4a2064 /lisp/mouse.el | |
parent | bbc108377873aa6ed7cf21c731770103096eea39 (diff) | |
parent | ba355de014b75ed104da4777f909db70d62f2357 (diff) | |
download | emacs-b87c4ff2817e71ca71b028792200b1e069a95e04.tar.gz |
Merge from trunk.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r-- | lisp/mouse.el | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 6f374b6cd88..91a17f0d980 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1074,22 +1074,21 @@ regardless of where you click." (deactivate-mark))) (or mouse-yank-at-point (mouse-set-point click)) (let ((primary - (cond - ((eq (framep (selected-frame)) 'w32) - ;; MS-Windows emulates PRIMARY in x-get-selection, but not - ;; in x-get-selection-value (the latter only accesses the - ;; clipboard). So try PRIMARY first, in case they selected - ;; something with the mouse in the current Emacs session. - (or (x-get-selection 'PRIMARY) - (x-get-selection-value))) - ((fboundp 'x-get-selection-value) ; MS-DOS and X. - ;; On X, x-get-selection-value supports more formats and - ;; encodings, so use it in preference to x-get-selection. - (or (x-get-selection-value) - (x-get-selection 'PRIMARY))) - ;; FIXME: What about xterm-mouse-mode etc.? - (t - (x-get-selection 'PRIMARY))))) + (if (fboundp 'x-get-selection-value) + (if (eq (framep (selected-frame)) 'w32) + ;; MS-Windows emulates PRIMARY in x-get-selection, but not + ;; in x-get-selection-value (the latter only accesses the + ;; clipboard). So try PRIMARY first, in case they selected + ;; something with the mouse in the current Emacs session. + (or (x-get-selection 'PRIMARY) + (x-get-selection-value)) + ;; Else MS-DOS or X. + ;; On X, x-get-selection-value supports more formats and + ;; encodings, so use it in preference to x-get-selection. + (or (x-get-selection-value) + (x-get-selection 'PRIMARY))) + ;; FIXME: What about xterm-mouse-mode etc.? + (x-get-selection 'PRIMARY)))) (unless primary (error "No selection is available")) (push-mark (point)) |