Commit 5aa78c2d authored by Jan Djärv's avatar Jan Djärv
Browse files

* lisp/term/common-win.el (saved-region-selection): Defvar it.

(x-select-text): Set saved-region-selection.

Fixes: debbugs:16382
parent 5197f0c2
2014-01-18 Jan Djärv <>
* term/common-win.el (saved-region-selection): Defvar it.
(x-select-text): Set saved-region-selection (Bug#16382).
2014-01-18 Glenn Morris <>
* emacs-lisp/authors.el (authors-aliases)
......@@ -47,6 +47,7 @@ This variable is not used by the Nextstep port."
(defvar x-select-enable-primary) ; x-win.el
(defvar x-last-selected-text-primary)
(defvar x-last-selected-text-clipboard)
(defvar saved-region-selection) ; simple.el
(defun x-select-text (text)
"Select TEXT, a string, according to the window system.
......@@ -77,6 +78,10 @@ is not used)."
(x-set-selection 'PRIMARY text)
(setq x-last-selected-text-primary text))
(when x-select-enable-clipboard
;; When cutting, the selection is cleared and PRIMARY set to
;; the empty string. Prevent that, PRIMARY should not be reset
;; by cut (Bug#16382).
(setq saved-region-selection text)
(x-set-selection 'CLIPBOARD text)
(setq x-last-selected-text-clipboard text))))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment