diff options
| author | Eli Zaretskii | 2010-12-25 12:57:02 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2010-12-25 12:57:02 +0200 |
| commit | e77714da30b53ec866d2bbfd88527b215a715bb0 (patch) | |
| tree | e8c5596b21733557c1270dda02f75207466c9cbd | |
| parent | 36de6a045f3c3de316e2703aecee2861ede70cb4 (diff) | |
| download | emacs-e77714da30b53ec866d2bbfd88527b215a715bb0.tar.gz emacs-e77714da30b53ec866d2bbfd88527b215a715bb0.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/mouse.el | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f3449278d68..ccf5b5c40ea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-12-25 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * mouse.el (mouse-yank-primary): On MS-Windows, try the (emulated) | ||
| 4 | PRIMARY first, then the clipboard. (Bug#7699) | ||
| 5 | |||
| 1 | 2010-12-22 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2010-12-22 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-output-docform): Fix up use of | 8 | * emacs-lisp/bytecomp.el (byte-compile-output-docform): Fix up use of |
diff --git a/lisp/mouse.el b/lisp/mouse.el index aa5dadf84ff..14d981f78b2 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -1282,7 +1282,16 @@ regardless of where you click." | |||
| 1282 | (or mouse-yank-at-point (mouse-set-point click)) | 1282 | (or mouse-yank-at-point (mouse-set-point click)) |
| 1283 | (let ((primary | 1283 | (let ((primary |
| 1284 | (cond | 1284 | (cond |
| 1285 | ((fboundp 'x-get-selection-value) ; MS-DOS, MS-Windows and X. | 1285 | ((eq system-type 'windows-nt) |
| 1286 | ;; MS-Windows emulates PRIMARY in x-get-selection, but not | ||
| 1287 | ;; in x-get-selection-value (the latter only accesses the | ||
| 1288 | ;; clipboard). So try PRIMARY first, in case they selected | ||
| 1289 | ;; something with the mouse in the current Emacs session. | ||
| 1290 | (or (x-get-selection 'PRIMARY) | ||
| 1291 | (x-get-selection-value))) | ||
| 1292 | ((fboundp 'x-get-selection-value) ; MS-DOS and X. | ||
| 1293 | ;; On X, x-get-selection-value supports more formats and | ||
| 1294 | ;; encodings, so use it in preference to x-get-selection. | ||
| 1286 | (or (x-get-selection-value) | 1295 | (or (x-get-selection-value) |
| 1287 | (x-get-selection 'PRIMARY))) | 1296 | (x-get-selection 'PRIMARY))) |
| 1288 | ;; FIXME: What about xterm-mouse-mode etc.? | 1297 | ;; FIXME: What about xterm-mouse-mode etc.? |