summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-09-26 10:37:16 +0300
committerEli Zaretskii <eliz@gnu.org>2013-09-26 10:37:16 +0300
commitb87c4ff2817e71ca71b028792200b1e069a95e04 (patch)
treebfe00c0655fa02078a9ab2c633ea06d90c4a2064 /lisp/mouse.el
parentbbc108377873aa6ed7cf21c731770103096eea39 (diff)
parentba355de014b75ed104da4777f909db70d62f2357 (diff)
downloademacs-b87c4ff2817e71ca71b028792200b1e069a95e04.tar.gz
Merge from trunk.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el31
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))