emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102707: Fix bug #7699 with pasting s


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102707: Fix bug #7699 with pasting selected text on MS-Windows.
Date: Sat, 25 Dec 2010 12:57:02 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102707
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2010-12-25 12:57:02 +0200
message:
  Fix bug #7699 with pasting selected text on MS-Windows.
  
   mouse.el (mouse-yank-primary): On MS-Windows, try the (emulated)
   PRIMARY first, then the clipboard.
modified:
  lisp/ChangeLog
  lisp/mouse.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-12-23 00:00:12 +0000
+++ b/lisp/ChangeLog    2010-12-25 10:57:02 +0000
@@ -1,3 +1,8 @@
+2010-12-25  Eli Zaretskii  <address@hidden>
+
+       * mouse.el (mouse-yank-primary): On MS-Windows, try the (emulated)
+       PRIMARY first, then the clipboard.  (Bug#7699)
+
 2010-12-22  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/bytecomp.el (byte-compile-output-docform): Fix up use of

=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el     2010-12-13 15:27:36 +0000
+++ b/lisp/mouse.el     2010-12-25 10:57:02 +0000
@@ -1282,7 +1282,16 @@
   (or mouse-yank-at-point (mouse-set-point click))
   (let ((primary
         (cond
-         ((fboundp 'x-get-selection-value) ; MS-DOS, MS-Windows and X.
+         ((eq system-type 'windows-nt)
+          ;; 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.?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]