diff options
| author | Jan Djärv | 2014-01-18 16:11:03 +0100 |
|---|---|---|
| committer | Jan Djärv | 2014-01-18 16:11:03 +0100 |
| commit | 5aa78c2dbab6e1e2174957d5c4e16da0fc971a87 (patch) | |
| tree | 48fe7d8a205ef02241ed7efc3deac9359337dec1 | |
| parent | 5197f0c2fee01c473b4876f6a49e784250f63640 (diff) | |
| download | emacs-5aa78c2dbab6e1e2174957d5c4e16da0fc971a87.tar.gz emacs-5aa78c2dbab6e1e2174957d5c4e16da0fc971a87.zip | |
* lisp/term/common-win.el (saved-region-selection): Defvar it.
(x-select-text): Set saved-region-selection.
Fixes: debbugs:16382
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/term/common-win.el | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6faac565f82..83d61f16ce6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-01-18 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * term/common-win.el (saved-region-selection): Defvar it. | ||
| 4 | (x-select-text): Set saved-region-selection (Bug#16382). | ||
| 5 | |||
| 1 | 2014-01-18 Glenn Morris <rgm@gnu.org> | 6 | 2014-01-18 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * emacs-lisp/authors.el (authors-aliases) | 8 | * emacs-lisp/authors.el (authors-aliases) |
diff --git a/lisp/term/common-win.el b/lisp/term/common-win.el index 36417491c2e..31aa5ffdc42 100644 --- a/lisp/term/common-win.el +++ b/lisp/term/common-win.el | |||
| @@ -47,6 +47,7 @@ This variable is not used by the Nextstep port." | |||
| 47 | (defvar x-select-enable-primary) ; x-win.el | 47 | (defvar x-select-enable-primary) ; x-win.el |
| 48 | (defvar x-last-selected-text-primary) | 48 | (defvar x-last-selected-text-primary) |
| 49 | (defvar x-last-selected-text-clipboard) | 49 | (defvar x-last-selected-text-clipboard) |
| 50 | (defvar saved-region-selection) ; simple.el | ||
| 50 | 51 | ||
| 51 | (defun x-select-text (text) | 52 | (defun x-select-text (text) |
| 52 | "Select TEXT, a string, according to the window system. | 53 | "Select TEXT, a string, according to the window system. |
| @@ -77,6 +78,10 @@ is not used)." | |||
| 77 | (x-set-selection 'PRIMARY text) | 78 | (x-set-selection 'PRIMARY text) |
| 78 | (setq x-last-selected-text-primary text)) | 79 | (setq x-last-selected-text-primary text)) |
| 79 | (when x-select-enable-clipboard | 80 | (when x-select-enable-clipboard |
| 81 | ;; When cutting, the selection is cleared and PRIMARY set to | ||
| 82 | ;; the empty string. Prevent that, PRIMARY should not be reset | ||
| 83 | ;; by cut (Bug#16382). | ||
| 84 | (setq saved-region-selection text) | ||
| 80 | (x-set-selection 'CLIPBOARD text) | 85 | (x-set-selection 'CLIPBOARD text) |
| 81 | (setq x-last-selected-text-clipboard text)))))) | 86 | (setq x-last-selected-text-clipboard text)))))) |
| 82 | 87 | ||