* lisp/term/common-win.el (saved-region-selection): Defvar it.
(x-select-text): Set saved-region-selection. Fixes: debbugs:16382
This commit is contained in:
parent
5197f0c2fe
commit
5aa78c2dba
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-01-18 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* term/common-win.el (saved-region-selection): Defvar it.
|
||||
(x-select-text): Set saved-region-selection (Bug#16382).
|
||||
|
||||
2014-01-18 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* 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))))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue