Mercurial > emacs
changeset 50114:627c4cc6b42b
(x-select-text): Don't set a text containing
eight-bit-control/graphic into the cut buffer.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 13 Mar 2003 06:23:59 +0000 |
parents | 8accd9a2cbed |
children | ca35e855ba24 |
files | lisp/term/x-win.el |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/term/x-win.el Thu Mar 13 00:10:12 2003 +0000 +++ b/lisp/term/x-win.el Thu Mar 13 06:23:59 2003 +0000 @@ -2126,14 +2126,20 @@ (cond ((>= (length text) x-cut-buffer-max) (x-set-cut-buffer "" push) (setq x-last-selected-text-cut "")) + ((and (multibyte-string-p text) + (let ((charsets (find-charset-string text))) + (or (memq 'eight-bit-control charsets) + (memq 'eight-bit-graphic charsets)))) + (x-set-cut-buffer "" push) + (setq x-last-selected-text-cut "")) (t - (x-set-cut-buffer text push) + (x-set-cut-buffer text push) (setq x-last-selected-text-cut text))) (x-set-selection 'PRIMARY text) (setq x-last-selected-text-primary text) (when x-select-enable-clipboard - (x-set-selection 'CLIPBOARD text) - (setq x-last-selected-text-clipboard text)) + (x-set-selection 'CLIPBOARD text) + (setq x-last-selected-text-clipboard text)) ) ;;; Return the value of the current X selection.