From: Glenn Morris Date: Wed, 18 Sep 2013 04:21:29 +0000 (-0700) Subject: * mouse.el (mouse-yank-primary): Reorder to silence --without-x compilation. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1558 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5f30349b1ec61b687a2e238368168bb01bfcfe68;p=emacs.git * mouse.el (mouse-yank-primary): Reorder to silence --without-x compilation. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b1bd0006438..af062359d4e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-09-18 Glenn Morris + * mouse.el (mouse-yank-primary): + Reorder to silence --without-x compilation. + * mail/rmailmm.el (rmail-mime-set-bulk-data): Silence --without-x compilation. diff --git a/lisp/mouse.el b/lisp/mouse.el index 0367cad87b8..219287c4767 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1147,22 +1147,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))