From: Jan Djärv Date: Sat, 18 Jan 2014 15:11:03 +0000 (+0100) Subject: * lisp/term/common-win.el (saved-region-selection): Defvar it. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~341 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5aa78c2dbab6e1e2174957d5c4e16da0fc971a87;p=emacs.git * lisp/term/common-win.el (saved-region-selection): Defvar it. (x-select-text): Set saved-region-selection. Fixes: debbugs:16382 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6faac565f82..83d61f16ce6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +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) 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." (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))))))